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 10-10-2005, 03:30 AM
alissalee alissalee is offline
Mr. Ciprioni Atrius Admin
alissalee's Avatar
Join Date: Dec 2004
Location: Lawrence, Ma
Posts: 190
alissalee is an unknown quantity at this point
Send a message via AIM to alissalee Send a message via MSN to alissalee
Hp Script

Can some one help me make this hp script be the only thing that shows when u log on and get hit.
NPC Code:
if (actionserverside){
this.player = testplayer(strtofloat(#p(0)),strtofloat(#p(1)));
setstring this.account,#a(#v(this.player));
this.return = 1;
}
//#CLIENTSIDE
if (created||timeout) {
this.test = testplayer(mousex,mousey);
timeout=0.5;
}
if (this.hp != -2 && this.hp != -1){
triggeraction 0,0,serverside,-hp,#v(mousex),#v(mousey);
showtext 1,playerx,playery-1,Arial,b,Hp: 12#s(this.account);
changeimgzoom 1,0.7;
}
if (this.return == 2){
message #s(this.account);
this.return = 0;
}

__________________
account was being used by jigga.... sorry for what he has said in the past
Reply With Quote
  #2  
Old 10-10-2005, 04:56 AM
ZeLpH_MyStiK ZeLpH_MyStiK is offline
Scripter
ZeLpH_MyStiK's Avatar
Join Date: May 2003
Location: NYC
Posts: 553
ZeLpH_MyStiK is on a distinguished road
Send a message via MSN to ZeLpH_MyStiK Send a message via Yahoo to ZeLpH_MyStiK
1. the last two if-statements are made of boolean checks, they aren't event blocks.
2. this.return==2? wtf? how would this EVER equal 2?
3. #a(index) can be done clientside
4. setstring this.account,#a(#v(this.player)); no need to have #v()
5. if this npc worked, it'd show the health of another player (whom you've pointed at with your mouse) over YOUR head, i don't think that what you want.
6. what's this.hp? if you dont set it, it'll return 0
7. wtf in general.
__________________
Reply With Quote
  #3  
Old 10-10-2005, 08:37 AM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
You can't access this. serverside variables in the clientside portion of the script o_o to return a variable from serverside, you'd have to trigger serverside, get the variable, then trigger clientside with the variable as a parameter
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
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 12:17 AM.


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