Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-14-2002, 08:46 PM
IceFire_TK IceFire_TK is offline
Banned
Join Date: Nov 2001
Location: O' Canada
Posts: 375
IceFire_TK is on a distinguished road
Send a message via AIM to IceFire_TK Send a message via Yahoo to IceFire_TK
Arrow Extra Status Bar Help!

Hello, Graalians and scripters alike.
I have been working on a status bar system for a friend for quite some time now. I have HP,MP and AP all up and 100% bug-free offline and online for both P2P and non-P2P servers. But, he would like to make another system, like another status bar called FP(Fire points). But i dunno how to create a string to save the FP data clientside. I tried using clint.fp, but it won't change with the bars, and/or it doesn't work, the FP doesn't register. The bars are correct, but my way of saving it as another system isn't

Could someone please help me! I really need to know how clientside system varible that will register kinda like a HP or MP bar(BUT NOT USING MP OR HP!)

Thanks!
Reply With Quote
  #2  
Old 05-14-2002, 09:06 PM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
I assume you mispelled the string prefix.
NPC Code:

setstring client.fp,#v(strtofloat(#s(client.fp)) + ammount);



That will add an ammount to your firepoints (assuming ammount is the variable you wish to add to the firepoints.). now as for converting the string into a variable it is simple.

NPC Code:

variable = strtofloat(#s(client.fp));



If this is for p2p i would suggest you use serverside triggeractions to edit a clientr. string instead of client. since client strings are easily hacked. You can use prefixed strings on non-p2p worlds. they just work like regular strings without an NPCs server (except for the obviouse server. prefix)

[edit] I have a habbit of editing my post multiple times after i post it [/edit]
__________________

subliminal message: 1+1=3
Reply With Quote
  #3  
Old 05-14-2002, 09:13 PM
IceFire_TK IceFire_TK is offline
Banned
Join Date: Nov 2001
Location: O' Canada
Posts: 375
IceFire_TK is on a distinguished road
Send a message via AIM to IceFire_TK Send a message via Yahoo to IceFire_TK
Ok I will try it
Thanks for the help


[EDIT] It's ok to edit your posts, i have that the nerve to do that too sometimes [/EDIT]
Reply With Quote
  #4  
Old 05-14-2002, 09:14 PM
Andor_RC9 Andor_RC9 is offline
Registered User
Join Date: Feb 2002
Location: U.S.A - Ohio
Posts: 84
Andor_RC9 is on a distinguished road
Send a message via ICQ to Andor_RC9 Send a message via AIM to Andor_RC9 Send a message via Yahoo to Andor_RC9
hmmm, did you set a variable or a string?
because client.fp = 1
is a variable, and i dont often use.
but setstring client.fp,1;
i like alot better, as i love strings

heres a sample, of like how to decrease it and increase it

// EVENT:Magic Weapon : Decreaser
NPC Code:

NPC Code:

if (weaponfired) {
if (strtofloat(#s(client.fp)) >= 10) {
setstring client.fp,#v(strtofloat(#s(client.fp))-10);
//put weapons stuff here
}
elseif (!strtofloat(#s(client.fp)) >= 10) {
setplayerprop #c,You dont have enough Fire Points!;
}
}





That is one way of decreasing the value.. (untested, should work)

NPC Code:

NPC Code:

// EVENT:Magic Fire Bean : Increaser
if (playertouchsme) {
say2 Your FP has been increased!;
if (strtofloat(#s(client.fp)) < this.maxfp - 25) {
setstring client.fp,#v(strtofloat(#s(client.fp))+25);
}
}





I think that would work.

..:| EDIT - God, im too slow again when did falados beat me to it? |:..

from R0bin
__________________
*mE0w*

Statistics show that 60% of all statistics are made-up

Last edited by Andor_RC9; 05-15-2002 at 04:18 AM..
Reply With Quote
  #5  
Old 05-14-2002, 09:31 PM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
Its good to have multiple views on the situation anyhow.

(I recomment useing code tags instead of PHP. Since PHP comments inlcude # just like Perl)
__________________

subliminal message: 1+1=3
Reply With Quote
  #6  
Old 05-14-2002, 10:59 PM
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
Quote:
Originally posted by Andor_RC9

ok.
NPC Code:

NPC Code:

setplayerprop #c,R0bin owns a clock...?;





teehee

from R0bin
. Hey fal u gotta edit that other post, inlcude? Yes, I prefer using [code] too it just works better...also ther PHP thing color coding can make some parts unreadable...Also R0bin, else if not elseif...
__________________

!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
  #7  
Old 05-14-2002, 11:31 PM
IceFire_TK IceFire_TK is offline
Banned
Join Date: Nov 2001
Location: O' Canada
Posts: 375
IceFire_TK is on a distinguished road
Send a message via AIM to IceFire_TK Send a message via Yahoo to IceFire_TK
they don't work

hmm... Maybe i wasn't clear, or i was unsure at the time.
But i want to to START at 100%(100) and go DOWN as you use it like HP. and then if you buy FP it goes back up.


thanks
Reply With Quote
  #8  
Old 05-15-2002, 12:24 AM
Neonight Neonight is offline
where da wmdz at
Neonight's Avatar
Join Date: Jun 2001
Location: Windsor, Illinois
Posts: 3,665
Neonight is on a distinguished road
Send a message via AIM to Neonight
Quote:
Originally posted by Saga2001

else if not elseif...

Jagen:
Both ways work fine, it depends on how you like to make it...
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 01:41 AM.


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