Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > NPC Server
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Rate Thread Display Modes
  #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
  #2  
Old 10-09-2002, 02:20 AM
Com013 Com013 is offline
Registered User
Join Date: Aug 2002
Location: GMT+1
Posts: 381
Com013 is on a distinguished road
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.
__________________
Com013
Former Admin of the LAT on Graal The Adventure

e-mail: [email protected]
  #3  
Old 10-09-2002, 06:05 AM
KuJi2002 KuJi2002 is offline
Banned
Join Date: Jul 2002
Location: NYC
Posts: 144
KuJi2002 is on a distinguished road
Send a message via AIM to KuJi2002 Send a message via Yahoo to KuJi2002
umm that looks like 2k1's jail script if u ask me
  #4  
Old 10-09-2002, 06:19 AM
Graal2001_NAT Graal2001_NAT is offline
Registered User
Join Date: Sep 2002
Posts: 241
Graal2001_NAT is on a distinguished road
how would you know
__________________
GONE, BAI
  #5  
Old 10-09-2002, 06:35 AM
emortylone emortylone is offline
Registered User
Join Date: Apr 2002
Location: Control-NPC
Posts: 834
emortylone is on a distinguished road
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
__________________
Quote:
*Stefan: it seems sometimes they hire newbie scripters everywhere x-x
*Stefan: scripters are sometimes like people that draw paintings
*Stefan: all that counts is that it looks nice
  #6  
Old 10-09-2002, 11:26 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
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.
__________________
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
  #7  
Old 10-10-2002, 12:49 AM
Com013 Com013 is offline
Registered User
Join Date: Aug 2002
Location: GMT+1
Posts: 381
Com013 is on a distinguished road
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.
__________________
Com013
Former Admin of the LAT on Graal The Adventure

e-mail: [email protected]
  #8  
Old 10-16-2002, 07:46 AM
KuJi2002 KuJi2002 is offline
Banned
Join Date: Jul 2002
Location: NYC
Posts: 144
KuJi2002 is on a distinguished road
Send a message via AIM to KuJi2002 Send a message via Yahoo to KuJi2002
I have 2k1 lvs
  #9  
Old 10-19-2002, 06:40 PM
R0bin R0bin is offline
Banned
R0bin's Avatar
Join Date: Oct 2002
Location: Wales, UK
Posts: 828
R0bin is on a distinguished road
Send a message via AIM to R0bin
omg, you must be teh 1337357 script0r with 2k1 levels.
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 04:29 AM.


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