News:

If you want to help support the game, please consider donating to AllGoFree!

Main Menu

Yell system really bad

Started by cody the coder, December 27, 2010, 03:13:22 PM

Previous topic - Next topic

Kryptonite

Quote from: cody the coder on December 27, 2010, 04:44:19 PM
Quote from: Insomnom on December 27, 2010, 04:07:04 PM
Quote from: cody the coder on December 27, 2010, 03:59:22 PM
...people will still abuse the yell...


That was kinda my entire point.
Doesn't matter what you do, it will still be there.
Normally I'd say that I'm not against the idea of the 10 second flood prevention thingy...
But I kinda am, if only for the fact that the chat box isn't very large and when I use yell I often have to break up my yells into multiple lines.
They can range from one to five lines, depending on what I'm buying/selling/announcing.
And some of my announcements are pretty important, at least for the newer players.
Having to wait ten seconds to send another line (not to mention trying to send another one too soon and having to retype it all again) would really tick me off after awhile.

IMO. I'd rather put up with the mild yell abuse than have to go through that. lol

I agree, but why not doing this just to the normal players, for players who have more than 1 playerRight will be able to yell
for example
if(command.startsWith("Yell") && command.substring(4)){
Yellcode()
YellTimer = 10;
} else if(playerRights >= 1){
Yell code()
}

Thats it i think .


Wtf?

I don't think the substring thing goes there.

Here's my shot at it.

if(command.startsWith("yell")){
String yelltext = command.substring(4);
if (YellTimer == 0) {
messagetoall(""+ username + ": "+ yelltext +"");
YellTimer = 10;
}
else {
sendMessage("You need to wait " + YellTimer +" seconds before yelling again.");
}
}


I realize it's not quite right because the voids aren't named the same as blitz, but whatever.

Quote from: Recoil on April 18, 2012, 06:21:22 PM
Quote from: X on April 18, 2012, 06:20:22 PM
Quote from: Recoil on April 18, 2012, 05:59:45 PM
Da fuq are you doing in a graffiti painted hobo dungeon for?

weed
Just lost all the respect I once had for you.



cody the coder

#16
Yeah, yours looks copy & pasted though, i did mine quick, too lazy to look in my source for the codes :P
And Blitz to my looks doesn't look like downloaded source that has the same system of codes though it looks like a server started from scratch, no downloads and thats VERY Impressive, Thats like they created runescape all over again (old version)
Merry Christmas ! :)

Kryptonite

Not copied I came up with it as I posted. I don't know where I would've copied it from :\

Quote from: Recoil on April 18, 2012, 06:21:22 PM
Quote from: X on April 18, 2012, 06:20:22 PM
Quote from: Recoil on April 18, 2012, 05:59:45 PM
Da fuq are you doing in a graffiti painted hobo dungeon for?

weed
Just lost all the respect I once had for you.



cody the coder

Quote from: Kryptonite on December 27, 2010, 05:19:59 PM
Not copied I came up with it as I posted. I don't know where I would've copied it from :\
It isn't that hard to create a yell code like you did, so i believe you but i made mine as simple as possible i dont think there source is compatable with any of the codes, because they started it from scratch as i can see. everything is just coded by there bare hands.
Merry Christmas ! :)

Sad Panda

Stop.. I don't want people to fight... Unless I'm involved anyway.

cody the coder

Quote from: Killer Panda on December 27, 2010, 06:05:32 PM
Stop.. I don't want people to fight... Unless I'm involved anyway.
Hehe, were not fighting lol.
Merry Christmas ! :)

DISS

but the entire thing of what cody is doing, is giving us a totally different java code.

Ryan can't just take that and put in the source, there really isn't a source.
It's a secret ryan keeps from all of us but he may leak it, MySQL.

so its not all if blah blah blah

Kryptonite

Quote from: Killer Panda on December 27, 2010, 06:05:32 PM
Stop.. I don't want people to fight... Unless I'm involved anyway.

We're not fighting. We're simply talking in a weird nerd language.

Quote from: Recoil on April 18, 2012, 06:21:22 PM
Quote from: X on April 18, 2012, 06:20:22 PM
Quote from: Recoil on April 18, 2012, 05:59:45 PM
Da fuq are you doing in a graffiti painted hobo dungeon for?

weed
Just lost all the respect I once had for you.



Flame

or we could just go back to letting people talk about whatever they want in ::yell ...

Dug

#24
IMO People who abuse yell just don't want to follow the rules or they get carried away..
Nothing but having the well known community remind other players about not abusing the yell will change Jazmin's fact.
'Intelligence plus character - that is the goal of true education.' - Dr. Martin Luther King
Ryan, Jeremy, Jake, Jose, Kevin, Oscar, Wouter, Marcio, Andy, Alex, Alex[Kumkwat], Luke, Avery, Kyle, Mazen, Omar, Connor, Tyren, Amanda, Stephani, Maxi, Aaron, Jeremy(ramp), Sean, Ramón, Kevin(tom), Dylan, Ross, Bill, Maarten, RATMAN, COLESHOT, RYAN1, I HAZ BACKUP, White Angel,  ALL OF YOU ROCK THE WORLD AND MAKE ME FEEL ALIVE. Mo is what makes me feel.
My Skype username = Private! Get away :(
WSB trailer- http://www.youtube.com/watch?v=Hv84zmlFjQs



â"Œâˆ©â"(●_●)â"Œâˆ©â"ï»¿ To all you nice pop song haters..

Kryptonite

Quote from: Flame on December 28, 2010, 03:18:36 AM
or we could just go back to letting people talk about whatever they want in ::yell ...


I seriously agree..

Quote from: Recoil on April 18, 2012, 06:21:22 PM
Quote from: X on April 18, 2012, 06:20:22 PM
Quote from: Recoil on April 18, 2012, 05:59:45 PM
Da fuq are you doing in a graffiti painted hobo dungeon for?

weed
Just lost all the respect I once had for you.



Sad Panda

Quote from: Kryptonite on December 28, 2010, 11:33:29 PM
Quote from: Flame on December 28, 2010, 03:18:36 AM
or we could just go back to letting people talk about whatever they want in ::yell ...



I seriously agree..

I agree as well. Saying that it's taking up your chat box is stupid. When people are just talking while you're in range does the exact same thing.

Ry60003333

Quote from: cody the coder on December 27, 2010, 04:44:19 PM
I agree, but why not doing this just to the normal players, for players who have more than 1 playerRight will be able to yell
for example
if(command.startsWith("Yell") && command.substring(4)){
Yellcode()
YellTimer = 10;
} else if(playerRights >= 1){
Yell code()
}

Thats it i think .
That is not how Blitz works.

Here is the class for the yell command in Blitz, just to give you some perspective.



/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/

package org.allgofree.rs2blitz.commands;
import org.allgofree.rs2blitz.pluginsystem.commands.CommandListener;
import org.allgofree.rs2blitz.players.Client;
import java.util.StringTokenizer;
import net.allgofree.util.RSTextUtils;
import org.allgofree.rs2blitz.players.MuteInfo;

/**
* The Yell command.
* @author ry60003333
*/
public class Yell implements CommandListener {
   
    /**
     * The Command Binds.
     */
    public static final String[] COMMAND_BINDS = {"yell"};

    /**
     * Words not allowed in yell messages.
     */
    public static final String[] BAD_WORDS = {};

    /**
     * Get the binds for the command.
     * @return The binds for the command.
     */
    public String[] getCommandBinds()
    {
        return COMMAND_BINDS;
    }

    /**
     * Get the level required to do this command.
     */
    public int getCommandLevel()
    {
        return -1;
    }

    /**
     * Get the usage.
     * @return The usage.
     */
    public String getUsage()
    {
        return "theMessage";
    }

    /**
     * Do the command.
     * @param commandParameters All the text after the command, omitting the space.
     * @param parameterTokens The tokens of the parameters.
     * @param theClient The player that typed the command.
     */
    public void doCommand(String commandParameters, StringTokenizer parameterTokens, Client theClient)
    {
        if (theClient.muteInfo.isMuted())
        {
            MuteInfo.muteMessage(theClient);
            return;
        }
        if (commandParameters.equalsIgnoreCase(""))
            throw new RuntimeException();
        String theMessage = RSTextUtils.optimizeText(commandParameters);
        for (String nextWord : BAD_WORDS)
        {
            if (theMessage.indexOf(nextWord) != -1)
            {
                theClient.packetMaker.sendMessage(theClient, "You cannot include the phrase '" + nextWord + "' in your yell.");
                return;
            }
        }
        String crownImage = "";
        int crownType = theClient.clientActions.getCrownType(theClient);
        if (crownType == 1)
        {
                crownImage = "<img=0>";
        }
        else if (crownType == 2)
        {
                crownImage = "<img=1>";
        }
        theClient.theEngine.playerManager.messageAll(crownImage + theClient.playerUsername + ": <col=990000>" + theMessage);
    }

    /**
     * {@inheritDoc}
     */
    public String getDescription()
    {
        return "Allows the player to yell across the entire server.";
    }
}


Quote
Triniboy: AllGoFree Staff don't get paid, they only get laid.




Sad Panda

Ryan's version seems considerably easier.

Kryptonite

Quote from: Ry60003333 on December 29, 2010, 01:46:46 AM
Quote from: cody the coder on December 27, 2010, 04:44:19 PM
I agree, but why not doing this just to the normal players, for players who have more than 1 playerRight will be able to yell
for example
if(command.startsWith("Yell") && command.substring(4)){
Yellcode()
YellTimer = 10;
} else if(playerRights >= 1){
Yell code()
}

Thats it i think .
That is not how Blitz works.

Here is the class for the yell command in Blitz, just to give you some perspective.



/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/

package org.allgofree.rs2blitz.commands;
import org.allgofree.rs2blitz.pluginsystem.commands.CommandListener;
import org.allgofree.rs2blitz.players.Client;
import java.util.StringTokenizer;
import net.allgofree.util.RSTextUtils;
import org.allgofree.rs2blitz.players.MuteInfo;

/**
* The Yell command.
* @author ry60003333
*/
public class Yell implements CommandListener {
   
    /**
     * The Command Binds.
     */
    public static final String[] COMMAND_BINDS = {"yell"};

    /**
     * Words not allowed in yell messages.
     */
    public static final String[] BAD_WORDS = {};

    /**
     * Get the binds for the command.
     * @return The binds for the command.
     */
    public String[] getCommandBinds()
    {
        return COMMAND_BINDS;
    }

    /**
     * Get the level required to do this command.
     */
    public int getCommandLevel()
    {
        return -1;
    }

    /**
     * Get the usage.
     * @return The usage.
     */
    public String getUsage()
    {
        return "theMessage";
    }

    /**
     * Do the command.
     * @param commandParameters All the text after the command, omitting the space.
     * @param parameterTokens The tokens of the parameters.
     * @param theClient The player that typed the command.
     */
    public void doCommand(String commandParameters, StringTokenizer parameterTokens, Client theClient)
    {
        if (theClient.muteInfo.isMuted())
        {
            MuteInfo.muteMessage(theClient);
            return;
        }
        if (commandParameters.equalsIgnoreCase(""))
            throw new RuntimeException();
        String theMessage = RSTextUtils.optimizeText(commandParameters);
        for (String nextWord : BAD_WORDS)
        {
            if (theMessage.indexOf(nextWord) != -1)
            {
                theClient.packetMaker.sendMessage(theClient, "You cannot include the phrase '" + nextWord + "' in your yell.");
                return;
            }
        }
        String crownImage = "";
        int crownType = theClient.clientActions.getCrownType(theClient);
        if (crownType == 1)
        {
                crownImage = "<img=0>";
        }
        else if (crownType == 2)
        {
                crownImage = "<img=1>";
        }
        theClient.theEngine.playerManager.messageAll(crownImage + theClient.playerUsername + ": <col=990000>" + theMessage);
    }

    /**
     * {@inheritDoc}
     */
    public String getDescription()
    {
        return "Allows the player to yell across the entire server.";
    }
}





JEESUS! A whole class just for yell??

Quote from: Recoil on April 18, 2012, 06:21:22 PM
Quote from: X on April 18, 2012, 06:20:22 PM
Quote from: Recoil on April 18, 2012, 05:59:45 PM
Da fuq are you doing in a graffiti painted hobo dungeon for?

weed
Just lost all the respect I once had for you.