Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Help? (https://forums.graalonline.com/forums/showthread.php?t=1355)

mystic_pheonix 04-14-2001 11:08 AM

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;
}

cell424 04-14-2001 06:42 PM

Yes I do know
 
1 Attachment(s)
Ok now have continue after the end of the lay2 command

Thak2 04-14-2001 10:32 PM

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?

vergil 04-15-2001 01:46 AM

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;
}



mystic_pheonix 04-15-2001 03:20 AM

i want it so i can say something other than greenrupee, like bluerupee or glove1, but not having to put it in several times.

grim_squeaker_x 04-15-2001 03:21 AM

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


mystic_pheonix 04-15-2001 08:28 AM

nonono, i want instead of greenrupee its could be glove1, goldrupee, goldsword, ect.!!!

Thak2 04-15-2001 10:50 PM

ohh, youd have to have the player say the item name and it saves that as a string then lays whatever the string is.

mystic_pheonix 04-16-2001 04:41 AM

exactly


All times are GMT +2. The time now is 01:58 PM.

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