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 09-26-2001, 09:35 AM
dragoonvenganc dragoonvenganc is offline
Registered User
Join Date: Jul 2001
Location: USA
Posts: 331
dragoonvenganc is on a distinguished road
Send a message via ICQ to dragoonvenganc Send a message via AIM to dragoonvenganc
Another Script That will Not work but this is harder..lol

first npc
if (playersays(Buy Pick)&& playerrupees>=39){toweapons Pick;playerrupees-=40;
setstring client.pickstrength,#v(strtofloat(#s(client.pickst rength))+100); }


if (weaponfired) {
setstring client.pickstrength,#v(strtofloat(#s(client.pickst rength))-.4)
triggeraction playerx+.5+vecx(playerdir)*2,playery+1+vecy(player dir)*2,mining,;
setani jaxe,pickaxemetal.png;}


OK now the first part works but this does not

if (created){setimg jrock.gif;this.power=100;timeout=.1}
if (timeout){

if (actionmining) {
this.power -= 5;
if (this.power<=0) {
setstring client.playeriron,#v(strtofloat(#s(client.playerir on))+1);
destroy;}}timeout=.1}


Should i even need the timeouts.. But the second part does not work the trigger action does not work ..
__________________
Dragoon Vengance
Owner of Pangea Relics of Time
P2P Rp server
For info or job
Email: [email protected]
aim: dragoonvengnc
Reply With Quote
  #2  
Old 09-26-2001, 10:23 AM
KJS KJS is offline
The one, The only -
KJS's Avatar
Join Date: Apr 2001
Location: USA, Minnesota
Posts: 1,012
KJS is on a distinguished road
Send a message via AIM to KJS
Re: Another Script That will Not work but this is harder..lol

ok my first question is this server going to be p2p? I say that cuz I am just wondering...
Quote:
Originally posted by dragoonvenganc
if (playersays(Buy Pick)&& playerrupees>=39){toweapons Pick;playerrupees-=40;
setstring client.pickstrength,#v(strtofloat(#s(client.pickst rength))+100); }
if (weaponfired) {
setstring client.pickstrength,#v(strtofloat(#s(client.pickst rength))-.4)
triggeraction playerx+.5+vecx(playerdir)*2,playery+1+vecy(player dir)*2,mining,;
setani jaxe,pickaxemetal.png;}
jw do you want the axe power to go down every time they swing or just when they hit the thing (I would say just when they hit the thing cuz it gives it a more realistic thing like things dont get dull unless you hit something with it)
setstring client.pickstrength,#v(strtofloat(#s(client.pickst rength))-.4)

that is the line you would ahve to change and put in the triggeraction insted of here
try
NPC Code:

if (playersays(Buy Pick)&&playerrupees>=39){
toweapons Pick;
playerrupees-=40;
setstring client.pickstrength,#v(strtofloat(#s(client.pickst rength))+100);
}
if (weaponfired) {
setstring client.pickstrength,#v(strtofloat(#s(client.pickst rength))-.4)
triggeraction playerx+1.5+vecx(playerdir)*2,playery+1.5+vecy(pla yerdir)*2,mining,;
setani jaxe,pickaxemetal.png;
}



Quote:

if (created){setimg jrock.gif;this.power=100;timeout=.1}
if (timeout){

if (actionmining) {
this.power -= 5;
if (this.power<=0) {
setstring client.playeriron,#v(strtofloat(#s(client.playerir on))+1);
destroy;}}timeout=.1}
try
NPC Code:

if (created){setimg jrock.gif;this.power=100;timeout=.1}
if (actionmining) {
this.power -= 5;
if (this.power<=0) {
setstring client.playeriron,#v(strtofloat(#s(client.playerir on))+1);
destroy;
}
}

__________________
Thanks,
-KJL
Reply With Quote
  #3  
Old 09-26-2001, 08:29 PM
dragoonvenganc dragoonvenganc is offline
Registered User
Join Date: Jul 2001
Location: USA
Posts: 331
dragoonvenganc is on a distinguished road
Send a message via ICQ to dragoonvenganc Send a message via AIM to dragoonvenganc
OK i will try when i get home

You changed

triggeraction playerx+1.5+vecx(playerdir)*2,playery+1.5+vecy(pla yerdir)*2,mining,;

ok i will try but i had the npc message the playerx and y and the trigger x and y.. when i had .5 and 1.5. the numbers were exact.. so i will try your changes..

And the server currently not. but i am trying to get the owner to get it p2p i think i can convince him because it will suck if not..

Because of ganis and ext.. one dir gani with no animation is horrible
__________________
Dragoon Vengance
Owner of Pangea Relics of Time
P2P Rp server
For info or job
Email: [email protected]
aim: dragoonvengnc
Reply With Quote
  #4  
Old 09-27-2001, 09:24 AM
dragoonvenganc dragoonvenganc is offline
Registered User
Join Date: Jul 2001
Location: USA
Posts: 331
dragoonvenganc is on a distinguished road
Send a message via ICQ to dragoonvenganc Send a message via AIM to dragoonvenganc
Thanx kjl.. That does work.. but i do not understand.. when i message the value of that it does not match the value of the npc..
O well it works..

but how can i do it for a bigger npc.. there should be a formula.. if some one can fiquere it out.. i am trying but just started and cant seem to get it right..
__________________
Dragoon Vengance
Owner of Pangea Relics of Time
P2P Rp server
For info or job
Email: [email protected]
aim: dragoonvengnc
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 06:41 AM.


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