View Single Post
  #1  
Old 10-09-2002, 12:58 AM
adam adam is offline
http://wiki.graal.us/
adam's Avatar
Join Date: Nov 2001
Posts: 2,247
adam has a spectacular aura aboutadam has a spectacular aura about
Send a message via AIM to adam
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;
}
}
}
}
}

__________________
Rogue Shadow (TCN)(NAT)(Global Development Team)

For development help, contact the patrons of the #graaldt irc channel below, I am usually there.
Click Here to Join IRC Chat Now! -- irc.freenode.net Channel: #graaldt
Quote:
<Dustyshouri> no, RogueShadow is always talking about scripts lol
<Dustyshouri> in fact, he pretty much brought Graal back as a topic single-handedly