Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Script Question (https://forums.graalonline.com/forums/showthread.php?t=5565)

ownerofbabylon 06-23-2001 02:19 PM

Script Question
 
I have a NPC weapon but i need this. I want it so someone with the guild tag (WarriorofLight) who says healer gets the weapon called healer. but if someone doesnt have the tag it warps them to jail.graal can anyone help?

KJS 06-23-2001 02:48 PM

basically
 
basically go like this

if(strequals(#g,WarriorofLight)){
//do whatever
}else{
setlevel2 jail.graal,30,30;
}

06-23-2001 05:05 PM

should be like this...

if (strequals(#g,Warrioroflight)&&strequals(#c,healer )) {
toweapons Healer;
else {setlevel bannedforevern00b.graal;
}
}

grim_squeaker_x 06-23-2001 06:03 PM

Yakuzo, this is how Graal would view that:
NPC Code:
if (strequals(#g,Warrioroflight)&&strequals(#c,healer  )) {
toweapons Healer;
else {
setlevel bannedforevern00b.graal;
}
}


And since there is no if before the else in this case you would just get a syntax error... A better version is this:
NPC Code:
if (playerchats&&!(isweapon)&&strequals(#c,healer)) {
if (strequals(#g,Warrioroflight)) toweapons Healer;
else setlevel2 jail.graal,32,32;
}


Yakuna2001 06-23-2001 06:20 PM

Quote:

Originally posted by grim_squeaker_x
Yakuzo, this is how Graal would view that:
NPC Code:
if (strequals(#g,Warrioroflight)&&strequals(#c,healer  )) {
toweapons Healer;
else {
setlevel bannedforevern00b.graal;
}
}


And since there is no if before the else in this case you would just get a syntax error... A better version is this:
NPC Code:
if (playerchats&&!(isweapon)&&strequals(#c,healer)) {
if (strequals(#g,Warrioroflight)) toweapons Healer;
else setlevel2 jail.graal,32,32;
}


yep, hes got the idea

ownerofbabylon 06-23-2001 10:37 PM

what does the isweapon statement do??

General 06-23-2001 11:48 PM

No wonder your servers not up

Babylon


All times are GMT +2. The time now is 05:36 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.