Graal Forums  

Go Back   Graal Forums > PlayerWorlds > PlayerWorlds Main Forum
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 11-01-2001, 01:51 PM
bo0ey bo0ey is offline
Registered User
bo0ey's Avatar
Join Date: Jun 2001
Location: United States
Posts: 563
bo0ey is on a distinguished road
Send a message via AIM to bo0ey Send a message via Yahoo to bo0ey
NPC Server scripting

How would I make an NPC so that if you touch it, your rupees go up by 1? And this script should work with the NPC Server
__________________

http://oink.has.it/ - My Website
Reply With Quote
  #2  
Old 11-01-2001, 10:56 PM
wark2 wark2 is offline
Registered User
Join Date: Oct 2001
Location: Canada
Posts: 306
wark2 is on a distinguished road
Send a message via AIM to wark2 Send a message via Yahoo to wark2
if (playertouchsme) {
playerrupees=playerrupees+1;
}

------- SO EASY --------
__________________
- Legend
Reply With Quote
  #3  
Old 11-02-2001, 01:54 AM
Petey84 Petey84 is offline
Registered User
Join Date: Sep 2001
Location: Johnstown PA, and Mobile AL
Posts: 308
Petey84 is on a distinguished road
Send a message via AIM to Petey84 Send a message via Yahoo to Petey84
Shakaku:
eer wrong section Booey, and i think it's the same as without npc server
__________________
-Pete aka Wilddude
-Nishoku as well ;D!

AIM
Pete: WildDude2002
Nishoku: Nishoku, SaikoAkumu
-----------------------------------------------
StarX480: bai
Reply With Quote
  #4  
Old 11-02-2001, 03:46 AM
Poogle Poogle is offline
Registered User
Poogle's Avatar
Join Date: Jun 2001
Posts: 2,471
Poogle is on a distinguished road
Or this

Id sont thikn this is what you want but try..

if (playettouchsme){
lay2 greenrupee, playerx, playery
}
i use that for a level where ppl are moving arounsd alot but also getting money
Reply With Quote
  #5  
Old 11-02-2001, 06:24 AM
BocoC BocoC is offline
Registered User
BocoC's Avatar
Join Date: Jun 2001
Location: Washington State, USA
Posts: 980
BocoC is on a distinguished road
Send a message via AIM to BocoC Send a message via Yahoo to BocoC
Wrong section, but, you would need to do a triggeraction to the control-npc which adds or subracts money from the player:

NPC Code:

Give player 3 Gralats
if (something) {
triggeraction 0,0,serverGralat,#a,3;
}

Take away 3 Gralats from player
if (something) {
triggeraction 0,0,serverGralat,#a,-3;
}

Control-NPC:
if (actionserverGralat) {
with (getplayer(#p(0))) {
playerrupees+=strtofloat(#p(1));
}
}

__________________
-Boco

FLKJH$TRFG*$(&%>FMG >REN<>F ;.kjsd
Reply With Quote
  #6  
Old 11-02-2001, 08:14 AM
LiquidIce00 LiquidIce00 is offline
RadioActive Monkeeh
LiquidIce00's Avatar
Join Date: Apr 2001
Location: dirty south
Posts: 2,112
LiquidIce00 is on a distinguished road
Send a message via ICQ to LiquidIce00 Send a message via AIM to LiquidIce00 Send a message via Yahoo to LiquidIce00
yah it has to be server sided.
__________________
LiquidIce *Owner* (UnholyNation)
-UN Website
http://www.unholynation.com
-UN Forum
http://forums.unholynation.com
-
-the thinker
-

-
onwall2 for nonp2p (i suck at onwall)
Reply With Quote
  #7  
Old 11-02-2001, 08:27 AM
Slaktmaster Slaktmaster is offline
man with the mastahplan
Slaktmaster's Avatar
Join Date: Apr 2001
Location: Half-way over the river styx
Posts: 4,422
Slaktmaster is an unknown quantity at this point
Send a message via ICQ to Slaktmaster Send a message via AIM to Slaktmaster
playertouchsme works fine
Reply With Quote
  #8  
Old 11-02-2001, 08:30 AM
LiquidIce00 LiquidIce00 is offline
RadioActive Monkeeh
LiquidIce00's Avatar
Join Date: Apr 2001
Location: dirty south
Posts: 2,112
LiquidIce00 is on a distinguished road
Send a message via ICQ to LiquidIce00 Send a message via AIM to LiquidIce00 Send a message via Yahoo to LiquidIce00
Quote:
Originally posted by Slaktmaster
playertouchsme works fine
not if its clientsided
__________________
LiquidIce *Owner* (UnholyNation)
-UN Website
http://www.unholynation.com
-UN Forum
http://forums.unholynation.com
-
-the thinker
-

-
onwall2 for nonp2p (i suck at onwall)
Reply With Quote
  #9  
Old 11-02-2001, 08:48 AM
Nishoku Nishoku is offline
Banned
Join Date: Aug 2001
Location: Mobile, AL
Posts: 355
Nishoku is on a distinguished road
Send a message via ICQ to Nishoku Send a message via AIM to Nishoku
Quote:
Originally posted by LiquidIce00


not if its clientsided
-Uses playertouchsme..
So I guess i'm a n00b
Reply With Quote
  #10  
Old 11-02-2001, 08:55 AM
Poogle Poogle is offline
Registered User
Poogle's Avatar
Join Date: Jun 2001
Posts: 2,471
Poogle is on a distinguished road
Re: Or this

Quote:
Originally posted by Poogle
Id sont thikn this is what you want but try..
i use that for a level where ppl are moving arounsd alot but also getting money
Gosh I screwed up typing there!
I dont think this is what you want but try.. is what i meant
Reply With Quote
  #11  
Old 11-02-2001, 10:31 PM
wark2 wark2 is offline
Registered User
Join Date: Oct 2001
Location: Canada
Posts: 306
wark2 is on a distinguished road
Send a message via AIM to wark2 Send a message via Yahoo to wark2
gosh! i thought i was a talented scripter, i use playertouchsme and playerrupees=playerrupees+(), you guys are so complicated!
__________________
- Legend
Reply With Quote
  #12  
Old 11-02-2001, 11:16 PM
Slaktmaster Slaktmaster is offline
man with the mastahplan
Slaktmaster's Avatar
Join Date: Apr 2001
Location: Half-way over the river styx
Posts: 4,422
Slaktmaster is an unknown quantity at this point
Send a message via ICQ to Slaktmaster Send a message via AIM to Slaktmaster
playertouchsme works server-side but you have to use setshape first. so ha and poo on you.
Reply With Quote
  #13  
Old 11-03-2001, 04:05 AM
Xaviar Xaviar is offline
Registered User
Join Date: Aug 2001
Location: Fairyland
Posts: 463
Xaviar is on a distinguished road
Send a message via ICQ to Xaviar Send a message via AIM to Xaviar
This is why non-P2P is fun Much less confusing..
__________________
One by one, the penguins steal my sanity.

*cookie for Xaviar* --Originally posted by Tyhm

--Xaviar

A m e r i c a
Reply With Quote
  #14  
Old 11-03-2001, 05:50 AM
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
The *real* NPC Server way to do it
NPC Code:
if (created) {
showcharacter;
setcharprop #3,head19.png;
setcharprop #C0,orange;
setcharprop #C1,gray;
setcharprop #C2,gray;
setcharprop #C3,brown;
setcharprop #C4,black;
setcharprop #2,izludeshield.png;
setcharprop #n,Stefan;
shieldpower = 1;
dir = 2;
ap = 100;
x += 0.5;
}
if (playertouchsme) {
dir = (playerdir+1)%4;
putnpc2 x+vecx(dir)*3,y+vecy(dir)*3,{
if (created) {
showcharacter;
setani gralat,1;
}
if (playertouchsme) {
playerrupees ++;
destroy;
}
};
message Here you are, greedy person!;
sleep 3;
dir = (dir+1)%4;
message;
}


A NPC that just increases your Gralat count would be really unrealistic
Totally off topic: Hmm, it would be cool if the code-Vb tag would format your script the same way the debugger on Graal does...
Reply With Quote
  #15  
Old 11-03-2001, 06:16 AM
Slaktmaster Slaktmaster is offline
man with the mastahplan
Slaktmaster's Avatar
Join Date: Apr 2001
Location: Half-way over the river styx
Posts: 4,422
Slaktmaster is an unknown quantity at this point
Send a message via ICQ to Slaktmaster Send a message via AIM to Slaktmaster
Thanks for that one Loriel, I never knew that you could use that #4 for setting the NPC direction.
Reply With Quote
  #16  
Old 11-03-2001, 06:25 AM
BocoC BocoC is offline
Registered User
BocoC's Avatar
Join Date: Jun 2001
Location: Washington State, USA
Posts: 980
BocoC is on a distinguished road
Send a message via AIM to BocoC Send a message via Yahoo to BocoC
Quote:
Originally posted by Loriel
The *real* NPC Server way to do it
NPC Code:
if (created) {
showcharacter;
setcharprop #3,head19.png;
setcharprop #C0,orange;
setcharprop #C1,gray;
setcharprop #C2,gray;
setcharprop #C3,brown;
setcharprop #C4,black;
setcharprop #2,izludeshield.png;
setcharprop #n,Stefan;
shieldpower = 1;
dir = 2;
ap = 100;
x += 0.5;
}
if (playertouchsme) {
dir = (playerdir+1)%4;
putnpc2 x+vecx(dir)*3,y+vecy(dir)*3,{
if (created) {
showcharacter;
setani gralat,1;
}
if (playertouchsme) {
playerrupees ++;
destroy;
}
};
message Here you are, greedy person!;
sleep 3;
dir = (dir+1)%4;
message;
}


A NPC that just increases your Gralat count would be really unrealistic
Totally off topic: Hmm, it would be cool if the code-Vb tag would format your script the same way the debugger on Graal does...
That is an interesting script. But I use my way if I want to take money away in a clientside script.
__________________
-Boco

FLKJH$TRFG*$(&%>FMG >REN<>F ;.kjsd
Reply With Quote
  #17  
Old 11-05-2001, 08:55 AM
JinZero JinZero is offline
something vague
Join Date: Mar 2001
Location: pokemon
Posts: 1,384
JinZero is on a distinguished road
Send a message via AIM to JinZero
B00ey, I really doubt that you can make a server, or a good level for that matter.
__________________
there's. no. retreat.
Reply With Quote
  #18  
Old 11-05-2001, 09:50 AM
royce royce is offline
Banned
royce's Avatar
Join Date: Sep 2001
Location: Yakitinzen, China
Posts: 2,271
royce is on a distinguished road
Send a message via AIM to royce
Jin, Why in the hell do u always like to find trouble at the end of threads?
Reply With Quote
  #19  
Old 11-05-2001, 12:43 PM
JinZero JinZero is offline
something vague
Join Date: Mar 2001
Location: pokemon
Posts: 1,384
JinZero is on a distinguished road
Send a message via AIM to JinZero
Quote:
Originally posted by royce
Jin, Why in the hell do u always like to find trouble at the end of threads?
Dunno
__________________
there's. no. retreat.
Reply With Quote
  #20  
Old 11-06-2001, 09:04 AM
6Burning6Church6 6Burning6Church6 is offline
Chance Mercy
Join Date: Oct 2001
Location: Coral Springs, Florida
Posts: 280
6Burning6Church6 is on a distinguished road
Re: NPC Server scripting

Quote:
Originally posted by bo0ey
How would I make an NPC so that if you touch it, your rupees go up by 1? And this script should work with the NPC Server
Hi,
We Graalians post this kind of stuff in NPC Server forum!
__________________

- American Pride
"We will stop terrorist TOGETHER." - President Bush
Quote:
Originally posted by Stefan
Oh that can happen because of stupid coding,
people doing stuff like

if (playertouchsme)
toweapons I am a dumb scripter
}

forgetting the ;
"Never argue with a idiot, or they'll be you by experience."
- So that means don't argue with me.
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 11:17 PM.


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