Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Server (https://forums.graalonline.com/forums/forumdisplay.php?f=14)
-   -   Will this scrtip work. (https://forums.graalonline.com/forums/showthread.php?t=39052)

adam 10-09-2002 12:58 AM

Will this scrtip work.
 
If you see anything in this script you know won't work right please let me know.

NPC Code:

// NPC made by Rogue Shadow
if (actionplayeronline){
if (strtofloat(#s(jail_time))>0){
if (!strequals(#F,police2.nw))setlevel2 police2.nw,10,20;
if (!strcontains(#s(this.prisoners),"#a"))addstring this.prisoners,"#a";
}else
if (strtofloat(#s(jail_time))<=0){
removestring this.prisoners,"#a";
}
}

if (actionserverjail){
if (strequals(#p(0),jail)){
with (getplayer(#p(1))){
setstring jail_time,#p(2);
setlevel2 police2.nw,10,20;
if (!strcontains(#s(this.prisoners),"#a"))addstring this.prisoners,"#a";
}
}
else
if (strequals(#p(0),unjail)){
with (getplayer(#p(1))){
setstring jail_time,0;
}
}
}

if (playerenters||timeout||created){
timeout=1;
}

if (timeout){
for (i=0;i<sarraylen(this.prisoners);i++){
with (getplayer(#I(this.prisoners,i))){
if (playeronline){
if (strtofloat(#s(jail_time))>0){
setstring jail_time,#v( strtofloat(#s(jail_time)) - 1 );
}else{
setlevel2 unstick.graal,30,30;
}
}
}
}
}


Com013 10-09-2002 02:20 AM

Isn't "if(action...)" a bit unsafe? Every hacker could trigger that.
You should check the tag of the player who triggered the action. If he doesn't have a GP tag the action will be ignored.

KuJi2002 10-09-2002 06:05 AM

umm that looks like 2k1's jail script if u ask me

Graal2001_NAT 10-09-2002 06:19 AM

how would you know

emortylone 10-09-2002 06:35 AM

LOL Kuji, when did YOU see the 2k1 Jail Script? I want to know what's w/ all these ****s and stealing scripts for 2k1 and places =/ Who's leaking them?
And a triggeraction isn't risky, because it should not be common knowledge as to the name of the trigger. if you're triggering to a serverside of an NPC< you need the NPC in the first place, so no worries.
---Shifter

adam 10-09-2002 11:26 AM

Quote:

Originally posted by KuJi2002
umm that looks like 2k1's jail script if u ask me
If it does look like g2k1's jail script then I guess im on the right track then huh.



This is only the first run through. I will prabably find a lot of things to fix/improve as I go through it again.

Com013 10-10-2002 12:49 AM

Quote:

Originally posted by emortylone
And a triggeraction isn't risky, because it should not be common knowledge as to the name of the trigger. if you're triggering to a serverside of an NPC< you need the NPC in the first place, so no worries.
---Shifter

Tyhm told me he noticed players abusing triggeraction on Classic. Putting everybody in the level in zorbi bubbles...
Putting them in bubbles is annoying, but jailing them is really dangerous.

KuJi2002 10-16-2002 07:46 AM

I have 2k1 lvs

R0bin 10-19-2002 06:40 PM

omg, you must be teh 1337357 script0r with 2k1 levels.


All times are GMT +2. The time now is 06:03 PM.

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