Graal Forums

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

zell12 02-07-2002 05:23 AM

Shop Help
 
Alright, I need some help with these 2 weapons, they won't work right: *Plez don't use them somewhere else >.<


if (playersays(buy horse caller)&&playerrupees=>600&&!hasweapon(Horse Caller)) {toweapons Horse Caller;
setstring horse,0;
playerrupees-=600;
}
if(playeronhorse&&strequals(#c,save horse 1)){
setstring horse,#5;
setplayerprop #c,Horse 1 Saved;
}
if(!firedonhorse&&strequals(#c,call horse 1)){
tokenize #s(horse);
puthorse #t(0),playerx,playery;
setplayerprop #c,Horse Called;
}
if(playeronhorse&&strequals(#c,save horse 2)){
setstring horse2,#5;
setplayerprop #c,Horse 2 Saved;
}
if(!firedonhorse&&strequals(#c,call horse 2)){
tokenize #s(horse2);
puthorse #t(0),playerx,playery;
setplayerprop #c,Horse Called;
}
if(playeronhorse&&strequals(#c,save horse 3)){
setstring horse3,#5;
setplayerprop #c,Horse 3 Saved;
}
if(!firedonhorse&&strequals(#c,call horse 3)){
tokenize #s(horse3);
puthorse #t(0),playerx,playery;
setplayerprop #c,Horse Called;
}
if(weaponfired){
say2 When on a horse say "save horse #"
#byou can save up to 3 horses.
#bSay "call horse #" to call that
#bhorse.#bEx:save horse 1.;
}

if (strequals(#c,buy Fire Wall)&&playerrupees=>1000&&!hasweapon(Fire Wall)) {
toweapons Fire Wall;
playerrupees -= 1000;
}
if(weaponfired&&playermp=>10){
playermp-=10;
freezeplayer 3;
playersprite=24;
timeout=.5;
this.radius=4;
if(playerdir=3)this.angle=(3*3.14)/2;
if(playerdir=0)this.angle=(3*3.14)/4;
if(playerdir=1)this.angle=3.14/2;
if(playerdir=2)this.angle=3.14/4; }
if(timeout&&this.radius<15){timeout=.05;
this.x=playerx+.5+cos(this.angle)*this.radius;
this.y=playery+.5+sin(this.angle)*this.radius;
putexplosion 1,this.x,this.y; this.radius+=.2;
this.angle+=.314}



The first one was already posted, but it still doesn't work right...

zell12 02-07-2002 05:39 AM

Hello o.O

Poogle 02-07-2002 06:02 AM

Re: Shop Help
 
Quote:

Originally posted by zell12
Alright, I need some help with these 2 weapons, they won't work right: *Plez don't use them somewhere else >.<


if (playersays(buy horse caller)&&playerrupees=>600&&!hasweapon(Horse Caller)) {toweapons Horse Caller;
setstring horse,0;
playerrupees-=600;
}
if(playeronhorse&&strequals(#c,save horse 1)){
setstring horse,#5;
setplayerprop #c,Horse 1 Saved;
}
if(!firedonhorse&&strequals(#c,call horse 1)){
tokenize #s(horse);
puthorse #t(0),playerx,playery;
setplayerprop #c,Horse Called;
}
if(playeronhorse&&strequals(#c,save horse 2)){
setstring horse2,#5;
setplayerprop #c,Horse 2 Saved;
}
if(!firedonhorse&&strequals(#c,call horse 2)){
tokenize #s(horse2);
puthorse #t(0),playerx,playery;
setplayerprop #c,Horse Called;
}
if(playeronhorse&&strequals(#c,save horse 3)){
setstring horse3,#5;
setplayerprop #c,Horse 3 Saved;
}
if(!firedonhorse&&strequals(#c,call horse 3)){
tokenize #s(horse3);
puthorse #t(0),playerx,playery;
setplayerprop #c,Horse Called;
}
if(weaponfired){
say2 When on a horse say "save horse #"
#byou can save up to 3 horses.
#bSay "call horse #" to call that
#bhorse.#bEx:save horse 1.;
}

if (strequals(#c,buy Fire Wall)&&playerrupees=>1000&&!hasweapon(Fire Wall)) {
toweapons Fire Wall;
playerrupees -= 1000;
}
if(weaponfired&&playermp=>10){
playermp-=10;
freezeplayer 3;
playersprite=24;
timeout=.5;
this.radius=4;
if(playerdir=3)this.angle=(3*3.14)/2;
if(playerdir=0)this.angle=(3*3.14)/4;
if(playerdir=1)this.angle=3.14/2;
if(playerdir=2)this.angle=3.14/4; }
if(timeout&&this.radius<15){timeout=.05;
this.x=playerx+.5+cos(this.angle)*this.radius;
this.y=playery+.5+sin(this.angle)*this.radius;
putexplosion 1,this.x,this.y; this.radius+=.2;
this.angle+=.314}



The first one was already posted, but it still doesn't work right...

put each onei n a diff npc

zell12 02-07-2002 06:22 AM

im not that dumb...lol :rolleyes:

Faheria_GP2 02-07-2002 06:22 AM

the code tag is nice, it helps see the spacing of the script

Dustey 02-07-2002 07:44 AM

playersays is ebil:eek: an be more specific what is happeing that is going wrong (what happens)

zell12 02-07-2002 08:26 AM

it just doesn't go to the inventory, I think playersays is history and i'll have to use playerchtts&&strequals(#c, )) >.<

Saga2001 02-08-2002 02:27 AM

Note: Or maybe this is rumor, but I have heard that playersays is a thing of the past, which i think is a good thing.

zell12 02-08-2002 04:17 AM

I liek it though, its better then going if (playerchats&&strequals(#c,raWr)) {

Wes2000 02-08-2002 05:23 AM

i know this is kinda stupid but:

if (playerenters) {
toweapons Fire Wall;
}
if(weaponfired){
freezeplayer 3;
playersprite=24;
timeout=.5;
this.pwr=1;
this.radius=4;
if(playerdir=3)this.angle=(3*3.14)/2;
if(playerdir=0)this.angle=(3*3.14)/4;
if(playerdir=1)this.angle=3.14/2;
if(playerdir=2)this.angle=3.14/4; }
if(timeout&&this.radius<15){timeout=.05;
this.x=playerx+.5+cos(this.angle)*this.radius;
this.y=playery+.5+sin(this.angle)*this.radius;
putexplosion this.pwr,this.x,this.y; this.radius+=.2;
this.pwr+=.1;
this.angle+=.314}

it makes the fire get bigger as it goes around ;) lol

Shard_IceFire 02-09-2002 05:53 AM

Quote:

Originally posted by Saga2001
Note: Or maybe this is rumor, but I have heard that playersays is a thing of the past, which i think is a good thing.
Stefan himself said the command has been gone since 1999, but many people refuse to except that it's gone.

zell12 02-09-2002 06:27 AM

Arg, is just simpler

zell12 02-09-2002 06:29 AM

How is it?

zell12 02-09-2002 11:18 PM

All I asked was how is it better to do a longer code

zell12 02-10-2002 03:34 AM

I guess it couldn't hurt

Faheria_GP2 02-10-2002 09:04 AM

actually, playersays is only still around to ensure backwards compatibility with older scripts

TDK_RC6 02-10-2002 10:36 AM

i think that playersays should be taken out competely

zell12 02-11-2002 03:39 AM

I still don't see whts so great about a long code >.<

konidias 02-11-2002 05:18 AM

Quote:

Originally posted by zell12
I still don't see whts so great about a long code >.<
The longer the coding for it, the more it can be varied.

zell12 02-11-2002 07:14 AM

alright then


All times are GMT +2. The time now is 07:10 PM.

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