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-14-2001, 11:08 AM
mystic_pheonix mystic_pheonix is offline
Registered User
Join Date: Mar 2001
Location: Dunno
Posts: 123
mystic_pheonix is on a distinguished road
Send a message via AIM to mystic_pheonix Send a message via Yahoo to mystic_pheonix
Question

Could someone help me with this? I know how to do it but it would require copy-pasting this 25 times and I was wondering if there was a shorter way of doing it. (I used greenrupee just to show what i meant by item.

if (playersays(greenrupee)) {
setplayerprop #c,;
playerdir = 2;
freezeplayer .2;
playersprite = 24;
lay2 greenrupee,playerx +0.5,playery +3;
}
__________________
Justin
Reply With Quote
  #2  
Old 04-14-2001, 06:42 PM
cell424 cell424 is offline
Registered User
Join Date: Mar 2001
Location: USA/PA
Posts: 184
cell424 is on a distinguished road
Send a message via AIM to cell424
Yes I do know

Ok now have continue after the end of the lay2 command
Attached Thumbnails
Click image for larger version

Name:	m2k1.gif
Views:	193
Size:	7.6 KB
ID:	317  
__________________
Trunks
Reply With Quote
  #3  
Old 04-14-2001, 10:32 PM
Thak2 Thak2 is offline
:]
Join Date: Mar 2001
Location: BC
Posts: 1,344
Thak2 is on a distinguished road
Send a message via AIM to Thak2
this will make it lay exactly 25 times when you say greenrupee

NPC Code:
if (playersays(greenrupee)||timeout&&!this.count>24) {
setplayerprop #c,;
playerdir = 2;
freezeplayer .2;
playersprite = 24;
lay2 greenrupee,playerx +0.5,playery +3;
this.count ++;
timeout=0.05;
}
if (playersays(greenrupee)&&this.count>24) {
this.count = 0;
}



is this what you wanted?
Reply With Quote
  #4  
Old 04-15-2001, 01:46 AM
vergil vergil is offline
Registered User
vergil's Avatar
Join Date: Mar 2001
Posts: 1,408
vergil will become famous soon enough
Send a message via ICQ to vergil
that only works once thak, and i think he wanted it to work withevery item too.
I tried for ya but I'm not any good with scripting, and it didn't work. if you can fix the error it should function properly..
NPC Code:
if (playerchats) {
this.drop = #c;
this.mode=1;
timeout=.05;
}
if (timeout) {
if (!this.count>25&&this.mode=1) {
lay2 this.drop,playerx +0.5,playery +3;
this.count ++;
}
if (this.count>25) {
this.count=0;
this.mode=0;
}
timeout=0.05;
}


Reply With Quote
  #5  
Old 04-15-2001, 03:20 AM
mystic_pheonix mystic_pheonix is offline
Registered User
Join Date: Mar 2001
Location: Dunno
Posts: 123
mystic_pheonix is on a distinguished road
Send a message via AIM to mystic_pheonix Send a message via Yahoo to mystic_pheonix
Angry

i want it so i can say something other than greenrupee, like bluerupee or glove1, but not having to put it in several times.
__________________
Justin
Reply With Quote
  #6  
Old 04-15-2001, 03:21 AM
grim_squeaker_x grim_squeaker_x is offline
Retired Oldbie
grim_squeaker_x's Avatar
Join Date: Mar 2001
Posts: 3,084
grim_squeaker_x will become famous soon enough
Kazoink!

25 instant items script
NPC Code:
if (weaponfired) {
for (this.i=0;this.i<25;this.i++) {
lay2 itemname,x,y;
}
}

__________________

Reply With Quote
  #7  
Old 04-15-2001, 08:28 AM
mystic_pheonix mystic_pheonix is offline
Registered User
Join Date: Mar 2001
Location: Dunno
Posts: 123
mystic_pheonix is on a distinguished road
Send a message via AIM to mystic_pheonix Send a message via Yahoo to mystic_pheonix
Angry

nonono, i want instead of greenrupee its could be glove1, goldrupee, goldsword, ect.!!!
__________________
Justin
Reply With Quote
  #8  
Old 04-15-2001, 10:50 PM
Thak2 Thak2 is offline
:]
Join Date: Mar 2001
Location: BC
Posts: 1,344
Thak2 is on a distinguished road
Send a message via AIM to Thak2
ohh, youd have to have the player say the item name and it saves that as a string then lays whatever the string is.
Reply With Quote
  #9  
Old 04-16-2001, 04:41 AM
mystic_pheonix mystic_pheonix is offline
Registered User
Join Date: Mar 2001
Location: Dunno
Posts: 123
mystic_pheonix is on a distinguished road
Send a message via AIM to mystic_pheonix Send a message via Yahoo to mystic_pheonix
exactly
__________________
Justin
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 04:33 AM.


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