Thread: Ummm
View Single Post
  #2  
Old 07-05-2002, 07:02 PM
CheeToS2 CheeToS2 is offline
That Guy
CheeToS2's Avatar
Join Date: Dec 2001
Location: Seattle, WA
Posts: 2,528
CheeToS2 will become famous soon enough
Send a message via AIM to CheeToS2
Re: Ummm

Quote:
Originally posted by Glory
Yes I know this script is wrong but I suck at scripting...this is what I have, well a friend has...

if (startswith(message,#c)) {
ishighstaff();
if (this.highstaff==1) {
if (tokenscount < 3) {
setstring server.message,0;

And well it needs to be so you say

message "accountname" "what you want to appear over there head"

highstaff is like the tag so like (GP) etc. Pleasehelp
Well.. first.. you need an event to go along with startswith.. like playerchats.

NPC Code:
if (playerchats&&startswith(message,#c)){



That way.. the script knows when to check if #c starts with "message" or not.
ishighstaff doesnt really need to be a function..
You can add onto the first if statement to see if they're in that guild or not:
NPC Code:
if (playerchats&&startswith(message,#c)&&strequals(#g  ,GuildName)){



Now, the script will only go on if all three of those are true; The player chats, #c starts with message, and the guild the player is in is "GuildName."
If you want to make sure the player has more than 3 words there, use tokenize first.
NPC Code:
if (playerchats&&startswith(message,#c)&&strequals(#g  ,GuildName)){
tokenize #c;
if (tokenscount>=3){
setstring server.message,#t(2) //#t(2) is the 2nd token (third word).. so put the message in quotes when you type it out.. like message accountname "message here", that way everything inside the quotes will be treated as one token.
}
}

__________________

Reply With Quote