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 02-07-2002, 05:23 AM
zell12 zell12 is offline
Gone
zell12's Avatar
Join Date: Jun 2001
Location: Alberta, Canada
Posts: 8,541
zell12 will become famous soon enough
Send a message via ICQ to zell12 Send a message via AIM to zell12 Send a message via MSN to zell12
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...
__________________
Reply With Quote
  #2  
Old 02-07-2002, 05:39 AM
zell12 zell12 is offline
Gone
zell12's Avatar
Join Date: Jun 2001
Location: Alberta, Canada
Posts: 8,541
zell12 will become famous soon enough
Send a message via ICQ to zell12 Send a message via AIM to zell12 Send a message via MSN to zell12
Hello o.O
__________________
Reply With Quote
  #3  
Old 02-07-2002, 06:02 AM
Poogle Poogle is offline
Registered User
Poogle's Avatar
Join Date: Jun 2001
Posts: 2,471
Poogle is on a distinguished road
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
Reply With Quote
  #4  
Old 02-07-2002, 06:22 AM
zell12 zell12 is offline
Gone
zell12's Avatar
Join Date: Jun 2001
Location: Alberta, Canada
Posts: 8,541
zell12 will become famous soon enough
Send a message via ICQ to zell12 Send a message via AIM to zell12 Send a message via MSN to zell12
im not that dumb...lol
__________________
Reply With Quote
  #5  
Old 02-07-2002, 06:22 AM
Faheria_GP2 Faheria_GP2 is offline
Banned
Faheria_GP2's Avatar
Join Date: Oct 2001
Posts: 1,177
Faheria_GP2 is on a distinguished road
the code tag is nice, it helps see the spacing of the script
Reply With Quote
  #6  
Old 02-07-2002, 07:44 AM
Dustey Dustey is offline
Registered User
Join Date: Nov 2001
Location: Do You Think I Know?
Posts: 193
Dustey is on a distinguished road
Send a message via AIM to Dustey
playersays is ebil an be more specific what is happeing that is going wrong (what happens)
__________________
And Yes I work For.... Renegade
Reply With Quote
  #7  
Old 02-07-2002, 08:26 AM
zell12 zell12 is offline
Gone
zell12's Avatar
Join Date: Jun 2001
Location: Alberta, Canada
Posts: 8,541
zell12 will become famous soon enough
Send a message via ICQ to zell12 Send a message via AIM to zell12 Send a message via MSN to zell12
it just doesn't go to the inventory, I think playersays is history and i'll have to use playerchtts&&strequals(#c, )) >.<
__________________
Reply With Quote
  #8  
Old 02-08-2002, 02:27 AM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to 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.
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
Reply With Quote
  #9  
Old 02-08-2002, 04:17 AM
zell12 zell12 is offline
Gone
zell12's Avatar
Join Date: Jun 2001
Location: Alberta, Canada
Posts: 8,541
zell12 will become famous soon enough
Send a message via ICQ to zell12 Send a message via AIM to zell12 Send a message via MSN to zell12
I liek it though, its better then going if (playerchats&&strequals(#c,raWr)) {
__________________
Reply With Quote
  #10  
Old 02-08-2002, 05:23 AM
Wes2000 Wes2000 is offline
Registered User
Join Date: Dec 2001
Posts: 57
Wes2000 is on a distinguished road
Send a message via AIM to Wes2000
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
__________________
Reply With Quote
  #11  
Old 02-09-2002, 05:53 AM
Shard_IceFire Shard_IceFire is offline
Registered User
Shard_IceFire's Avatar
Join Date: Jun 2001
Location: Eastern Harkoonia
Posts: 861
Shard_IceFire is on a distinguished road
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.
__________________

-=Shard IceFire=-
Reply With Quote
  #12  
Old 02-09-2002, 06:27 AM
zell12 zell12 is offline
Gone
zell12's Avatar
Join Date: Jun 2001
Location: Alberta, Canada
Posts: 8,541
zell12 will become famous soon enough
Send a message via ICQ to zell12 Send a message via AIM to zell12 Send a message via MSN to zell12
Arg, is just simpler
__________________
Reply With Quote
  #13  
Old 02-09-2002, 06:29 AM
zell12 zell12 is offline
Gone
zell12's Avatar
Join Date: Jun 2001
Location: Alberta, Canada
Posts: 8,541
zell12 will become famous soon enough
Send a message via ICQ to zell12 Send a message via AIM to zell12 Send a message via MSN to zell12
How is it?
__________________
Reply With Quote
  #14  
Old 02-09-2002, 11:18 PM
zell12 zell12 is offline
Gone
zell12's Avatar
Join Date: Jun 2001
Location: Alberta, Canada
Posts: 8,541
zell12 will become famous soon enough
Send a message via ICQ to zell12 Send a message via AIM to zell12 Send a message via MSN to zell12
All I asked was how is it better to do a longer code
__________________
Reply With Quote
  #15  
Old 02-10-2002, 03:34 AM
zell12 zell12 is offline
Gone
zell12's Avatar
Join Date: Jun 2001
Location: Alberta, Canada
Posts: 8,541
zell12 will become famous soon enough
Send a message via ICQ to zell12 Send a message via AIM to zell12 Send a message via MSN to zell12
I guess it couldn't hurt
__________________
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 08:39 PM.


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