Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 04-07-2003, 08:46 PM
Ethic_Sern Ethic_Sern is offline
Banned
Join Date: Aug 2002
Location: NewYork,NY
Posts: 97
Ethic_Sern is on a distinguished road
Send a message via AIM to Ethic_Sern
#l, #f ????

Ok clientside
if(strcontains(#L,.nw))
Serverside
if(strcontains(#F,.nw))

Both dont work ......
Reply With Quote
  #2  
Old 04-07-2003, 08:58 PM
Jeff Jeff is offline
Registered User
Join Date: Oct 2002
Location: Nebraska, USA
Posts: 707
Jeff is on a distinguished road
Strcontains can be a bit finnicky sometimes. Use an indexof.
__________________
Jeff, the Archduke of Dustari
Member of the LAT on Graal The Adventure
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GO d+ s++:+ !a C++ UL+(UL+++)@ P+ L+(++)>+++ E---- W++@ N- !o ?K w(w--) !O !M@ !V PS- PE+ Y PGP t+ 5 X R tv(tv+) b++(b+)>b++++ DI(DI+) D-- G e->e++++ h! !r y
------END GEEK CODE BLOCK------
Reply With Quote
  #3  
Old 04-07-2003, 09:22 PM
Ethic_Sern Ethic_Sern is offline
Banned
Join Date: Aug 2002
Location: NewYork,NY
Posts: 97
Ethic_Sern is on a distinguished road
Send a message via AIM to Ethic_Sern
SO just indexof(#F.nw)
Reply With Quote
  #4  
Old 04-07-2003, 10:44 PM
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 Ethic_Sern
SO just indexof(#F.nw)
"indexof( partstr, str ) position of where partstr appears in str (-1 -> not in str)"

judging from this it should be.

"if (indexof(.nw,#L) != -1)message It is in the string.;"

But this is graal so try, try, and try again.

"strcontains( str, partstr ) str contains partstr"

judging from this your previous scripts should have worked fine....
But this is graal?

from commands.rtf
__________________
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
Reply With Quote
  #5  
Old 04-07-2003, 11:52 PM
Ethic_Sern Ethic_Sern is offline
Banned
Join Date: Aug 2002
Location: NewYork,NY
Posts: 97
Ethic_Sern is on a distinguished road
Send a message via AIM to Ethic_Sern
Quote:
Originally posted by adam


"indexof( partstr, str ) position of where partstr appears in str (-1 -> not in str)"

judging from this it should be.

"if (indexof(.nw,#L) != -1)message It is in the string.;"

See that works but it doesnt check all the time only when i log on and offline
Reply With Quote
  #6  
Old 04-07-2003, 11:54 PM
osrs osrs is offline
Graalian since 1998
osrs's Avatar
Join Date: Mar 2002
Location: Brazil
Posts: 2,724
osrs is on a distinguished road
Send a message via ICQ to osrs Send a message via AIM to osrs Send a message via MSN to osrs Send a message via Yahoo to osrs
Quote:
Originally posted by Ethic_Sern

See that works but it doesnt check all the time only when i log on and offline
hmm..timeout? :|
__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /
Reply With Quote
  #7  
Old 04-08-2003, 02:10 AM
Ethic_Sern Ethic_Sern is offline
Banned
Join Date: Aug 2002
Location: NewYork,NY
Posts: 97
Ethic_Sern is on a distinguished road
Send a message via AIM to Ethic_Sern
Quote:
Originally posted by osrs


hmm..timeout? :|
hmmmm NO
PS suggested
if (playerenters){
this.len = strlen(#F);
setstring this.level,#e(this.len-3,this.len,#F);
if (strequals(#s(this.level),.graal)){
graal();
}
if (strequals(#s(this.level),.nw)){
nw();
}
}

function graal(){
}
function nw(){

}
but this dont work
Reply With Quote
  #8  
Old 04-08-2003, 02:18 AM
Tseng Tseng is offline
Sublime
Tseng's Avatar
Join Date: Jan 2003
Location: California
Posts: 0
Tseng is on a distinguished road
It's:

if (strcontains(partstr,str)) {
//Stuff
}
__________________
Funny Things:
Quote:
Originally posted by Stefan
I didn't ban you, I only played a little bit with my RC.
-----
Reply With Quote
  #9  
Old 04-08-2003, 02:21 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
you want to check for the level extention?

i=indexof(.,#L);
setstring this.levelextention,#e(i,-1,#L);
i believe
Reply With Quote
  #10  
Old 04-08-2003, 02:30 AM
Knuckles Knuckles is offline
Registered User
Join Date: Sep 2002
Location: New York
Posts: 580
Knuckles is on a distinguished road
Send a message via AIM to Knuckles
...dude...

NPC Code:

if(indexof(.nw,#L) > -1) setplayerprop #c,This level's extension is '.nw'.;
else setplayerprop #c,This level's extension is '.graal'.;



I belive #L is for player level, and #F is for the NPC's level.
__________________
Knuckles
"They say 60% of the time, it works everytime!"
Reply With Quote
  #11  
Old 04-08-2003, 02:34 AM
Ethic_Sern Ethic_Sern is offline
Banned
Join Date: Aug 2002
Location: NewYork,NY
Posts: 97
Ethic_Sern is on a distinguished road
Send a message via AIM to Ethic_Sern
NvM i got it to work the problem issss finding out where to put in. In the weapon it dont work, in the control NPC it dont work it only works in if the npc is in the level it dont work for all levels .
ex i warpto 30 30 bob.graal (where the NPC is ) and it works
i reset the flags and warpto 30 30 bob2.graal and it dont work.

Any ideas????

Last edited by Ethic_Sern; 04-08-2003 at 02:44 AM..
Reply With Quote
  #12  
Old 04-08-2003, 08:27 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Quote:
Originally posted by Knuckles
...dude...

NPC Code:

if(indexof(.nw,#L) > -1) setplayerprop #c,This level's extension is '.nw'.;
else setplayerprop #c,This level's extension is '.graal'.;



I belive #L is for player level, and #F is for the NPC's level.
#F is used in with statements, if i had an npc

with(getplayer(Knuckles)) sendtorc #L;
it would send the NPCs level to rc, but if I did
with(getplayer(Knuckles)) sendtorc #F;
it would send the level that the account knuckles is in to rc
Reply With Quote
  #13  
Old 04-08-2003, 08:43 AM
Knuckles Knuckles is offline
Registered User
Join Date: Sep 2002
Location: New York
Posts: 580
Knuckles is on a distinguished road
Send a message via AIM to Knuckles
Ahh, I see..
__________________
Knuckles
"They say 60% of the time, it works everytime!"
Reply With Quote
  #14  
Old 04-08-2003, 06:33 PM
Loriel Loriel is offline
Somewhat rusty
Loriel's Avatar
Join Date: Mar 2001
Posts: 5,059
Loriel is a name known to allLoriel is a name known to allLoriel is a name known to allLoriel is a name known to all
I wonder what that original poster was trying to do.
Reply With Quote
  #15  
Old 04-08-2003, 07:42 PM
HoudiniMan HoudiniMan is offline
Playerworld Administrator
HoudiniMan's Avatar
Join Date: Dec 2001
Location: Calfiornia - USA
Posts: 3,512
HoudiniMan will become famous soon enough
Quote:
Originally posted by Loriel
I wonder what that original poster was trying to do.
They seem to be full of solutions to a question i didn't see... maybe he edited it?
__________________
-HoudiniMan (Chief Playerworld Administrator)
Compulsive Support Center Checker - 5 Years and Change
Graal Support Center

Reply With Quote
  #16  
Old 04-08-2003, 09:33 PM
Knuckles Knuckles is offline
Registered User
Join Date: Sep 2002
Location: New York
Posts: 580
Knuckles is on a distinguished road
Send a message via AIM to Knuckles
...We all interpret some things diffrently =o.
__________________
Knuckles
"They say 60% of the time, it works everytime!"
Reply With Quote
  #17  
Old 04-08-2003, 10:30 PM
Ethic_Sern Ethic_Sern is offline
Banned
Join Date: Aug 2002
Location: NewYork,NY
Posts: 97
Ethic_Sern is on a distinguished road
Send a message via AIM to Ethic_Sern
ITS MY B-DAY!!!!!

I am tring to get this to work EVERY time you enter a level.
if (playerenters){
this.len = strlen(#F);
setstring this.level,#e(this.len-3,this.len,#F);
if (strequals(#s(this.level),aal)){
addweapon -GUI;
removeweapon *GUI;
}
if (strequals(#s(this.level),.nw)){
addweapon *GUI;
removeweapon -GUI;
}
}

Right now its in the control NPC but it only works when i log on and off and i tried timeout loops in the System Weapon but it still doesnt work.
Any Ideas?
Reply With Quote
  #18  
Old 04-08-2003, 10:53 PM
Ethic_Sern Ethic_Sern is offline
Banned
Join Date: Aug 2002
Location: NewYork,NY
Posts: 97
Ethic_Sern is on a distinguished road
Send a message via AIM to Ethic_Sern
NVM i fixed it
if(created||timeout){
for(i=0;i<allplayerscount;i++) {
with(allplayers[i]) {
this.len = strlen(#F);
setstring this.level,#e(this.len-3,this.len,#F);
if (strequals(#s(this.level),aal)){
addweapon -GUI;
removeweapon *GUI;
}
if (strequals(#s(this.level),.nw)){
addweapon *GUI;
removeweapon -GUI;
}
}
}
timeout=1;
}

And i added it as an NPC then reset it and BAM it works
Reply With Quote
  #19  
Old 04-08-2003, 11:21 PM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
use code brackets x.x and that's completelly useless, plus if the player is on a gmap his level shows up as the gmap's serverside, what's so different about the levels that you need to use two different GUIs?
Reply With Quote
  #20  
Old 04-09-2003, 02:14 AM
Ethic_Sern Ethic_Sern is offline
Banned
Join Date: Aug 2002
Location: NewYork,NY
Posts: 97
Ethic_Sern is on a distinguished road
Send a message via AIM to Ethic_Sern
Its for Bravo ....... we made 2 servers on 1. Gold and Classic.
Reply With Quote
  #21  
Old 04-09-2003, 06:11 AM
HoudiniMan HoudiniMan is offline
Playerworld Administrator
HoudiniMan's Avatar
Join Date: Dec 2001
Location: Calfiornia - USA
Posts: 3,512
HoudiniMan will become famous soon enough
Quote:
Originally posted by Ethic_Sern
Its for Bravo ....... we made 2 servers on 1. Gold and Classic.
That will never work
__________________
-HoudiniMan (Chief Playerworld Administrator)
Compulsive Support Center Checker - 5 Years and Change
Graal Support Center

Reply With Quote
  #22  
Old 04-09-2003, 10:36 PM
Ethic_Sern Ethic_Sern is offline
Banned
Join Date: Aug 2002
Location: NewYork,NY
Posts: 97
Ethic_Sern is on a distinguished road
Send a message via AIM to Ethic_Sern
Quote:
Originally posted by HoudiniMan


That will never work
.... Hmm TOO BAD it already has 0_o
Reply With Quote
  #23  
Old 04-09-2003, 11:06 PM
Jeff Jeff is offline
Registered User
Join Date: Oct 2002
Location: Nebraska, USA
Posts: 707
Jeff is on a distinguished road
The problem with many of you playerworld types is that you count your chickens before they hatch.
__________________
Jeff, the Archduke of Dustari
Member of the LAT on Graal The Adventure
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GO d+ s++:+ !a C++ UL+(UL+++)@ P+ L+(++)>+++ E---- W++@ N- !o ?K w(w--) !O !M@ !V PS- PE+ Y PGP t+ 5 X R tv(tv+) b++(b+)>b++++ DI(DI+) D-- G e->e++++ h! !r y
------END GEEK CODE BLOCK------
Reply With Quote
  #24  
Old 04-09-2003, 11:14 PM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Quote:
Originally posted by Ethic_Sern

.... Hmm TOO BAD it already has 0_o
why bother with two weapons, your serverside checks are inefficent and it would be much better if all of this was done clientside (the guis not working if you are in a .graal level or so)
Reply With Quote
  #25  
Old 04-11-2003, 01:27 AM
Ethic_Sern Ethic_Sern is offline
Banned
Join Date: Aug 2002
Location: NewYork,NY
Posts: 97
Ethic_Sern is on a distinguished road
Send a message via AIM to Ethic_Sern
Quote:
Originally posted by Python523

why bother with two weapons, your serverside checks are inefficent and it would be much better if all of this was done clientside (the guis not working if you are in a .graal level or so)
wts are you talking about .... go on Bravo Online and see for your self .....
Reply With Quote
Reply


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 01:57 AM.


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