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-30-2001, 04:16 AM
oscarjf1 oscarjf1 is offline
Registered User
Join Date: Aug 2001
Location: I live in the US
Posts: 107
oscarjf1 is on a distinguished road
Send a message via AIM to oscarjf1
why wont this work?

Has graal just decided to piss me off? I think so. This script used to ALWAYS work! No matter what, it would do what i wanted!
But now, it doesnt.

Script: Status Bar (Blah Blah Blah, saying i cant script a status bar is a waste of our time).

can someone debug this script for me? I can't seem to figure out what is wrong! When you get hurt, it doesnt work!

NPC Code:

// NPC made by War Lord Mpg2
if (playerenters) {
}
if (playertouchsme) {toweapons *Status; hidelocal; setstring client.bar1,warbar1.gif;
setstring client.bar2,warbar2.gif; set client.statson; timeout = .05;
}
//#CLIENTSIDE
if (timeout) {
if (client.statson) {
showimg 1111,#s(client.bar1),screenwidth-242,0; changeimgvis 1111,4;
changeimgvis 2222,4; changeimgvis 1111,4;
changeimgpart 2222,0,0,7*32*playerhearts/playerfullhearts,48;
if (playerhearts=playerfullhearts) {
showimg 2222,#s(client.bar2),screenwidth-242,0; changeimgvis 2222,4;
}
timeout = .05;
}
}
if (weaponfired) {set client.statson; setplayerprop #c,say "statsoff" to turn off;
timeout = .05; showstats 95+128+256+512+1024;
showimg 1111,#s(client.bar1),screenwidth-242,0; changeimgvis 1111,4;
showimg 2222,#s(client.bar2),screenwidth-242,0; changeimgvis 2222,4;
}
if (strequals(#c,statsoff)) {unset client.statson; sleep .2; hideimg 1111; hideimg 2222;
unset client.statson; showstats 95+128+256+512+1024+32;
}
if (playerdies) { showstats 95+128+256+512+1024;
}



Well?
__________________
I speek on behalf of my staff.
~laterz

Lagoonia Staff
-Tiki God Of Power
Reply With Quote
  #2  
Old 09-30-2001, 04:36 AM
oscarjf1 oscarjf1 is offline
Registered User
Join Date: Aug 2001
Location: I live in the US
Posts: 107
oscarjf1 is on a distinguished road
Send a message via AIM to oscarjf1
...

yes, feel free to post.
__________________
I speek on behalf of my staff.
~laterz

Lagoonia Staff
-Tiki God Of Power
Reply With Quote
  #3  
Old 09-30-2001, 04:40 AM
entravial entravial is offline
Registered User
entravial's Avatar
Join Date: Mar 2001
Posts: 825
entravial is on a distinguished road
Send a message via ICQ to entravial Send a message via AIM to entravial Send a message via Yahoo to entravial
~AlphaFlame~

*runs by and puts post-its all over the place, then runs off into the monkey weed*

*calls back* I "post"ed.
__________________


If the post says ~AlphaFlame~, that's who's posting. If not, it's Entravial (owner)
Reply With Quote
  #4  
Old 09-30-2001, 06:58 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
i dont think you can do #clientside with weapons
Reply With Quote
  #5  
Old 09-30-2001, 07:24 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
Quote:
Originally posted by Kaimetsu
Use addweapon nowadays.
whats the difference between addweapon and toweapons?
Reply With Quote
  #6  
Old 09-30-2001, 07:42 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
Quote:
Originally posted by Kaimetsu


...(It's NPC Server only, though).
arg
Reply With Quote
  #7  
Old 09-30-2001, 08:25 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
Whats wrong with it is that the index for the showimg is 2222 and I believe it only supports up to 400 or something.
__________________

-=Shard IceFire=-
Reply With Quote
  #8  
Old 09-30-2001, 08:34 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
Quote:
Originally posted by Shard_IceFire
Whats wrong with it is that the index for the showimg is 2222 and I believe it only supports up to 400 or something.
yes 400
Reply With Quote
  #9  
Old 09-30-2001, 11:58 AM
oscarjf1 oscarjf1 is offline
Registered User
Join Date: Aug 2001
Location: I live in the US
Posts: 107
oscarjf1 is on a distinguished road
Send a message via AIM to oscarjf1
thanx

i will try that. Im too damned tired right now...ill try it tomorrow.
__________________
I speek on behalf of my staff.
~laterz

Lagoonia Staff
-Tiki God Of Power
Reply With Quote
  #10  
Old 09-30-2001, 01:00 PM
Cybnext_Design Cybnext_Design is offline
Registered User
Join Date: Jun 2001
Posts: 244
Cybnext_Design is on a distinguished road
Send a message via AIM to Cybnext_Design
Quote:
Originally posted by Shard_IceFire
Whats wrong with it is that the index for the showimg is 2222 and I believe it only supports up to 400 or something.
I have had an index of 900 before, so I doubt its 400.
__________________
Graal2001 NPC Maker
Frolic Owner
Aim: C Y B N E X T
Reply With Quote
  #11  
Old 09-30-2001, 08:23 PM
Bhala Bhala is offline
Disgruntled Monkey
Bhala's Avatar
Join Date: Mar 2001
Posts: 779
Bhala is on a distinguished road
use 'while (client.statson)'.. if you use 'if (client.statson)' it will only work once....
Reply With Quote
  #12  
Old 10-01-2001, 12:20 AM
Xaviar Xaviar is offline
Registered User
Join Date: Aug 2001
Location: Fairyland
Posts: 463
Xaviar is on a distinguished road
Send a message via ICQ to Xaviar Send a message via AIM to Xaviar
Quote:
Originally posted by Bhala
use 'while (client.statson)'.. if you use 'if (client.statson)' it will only work once....
Wouldnt while be more laggy? (eg, resource hungry)?
__________________
One by one, the penguins steal my sanity.

*cookie for Xaviar* --Originally posted by Tyhm

--Xaviar

A m e r i c a
Reply With Quote
  #13  
Old 10-01-2001, 01:21 AM
oscarjf1 oscarjf1 is offline
Registered User
Join Date: Aug 2001
Location: I live in the US
Posts: 107
oscarjf1 is on a distinguished road
Send a message via AIM to oscarjf1
okay, im up

yes, the while statement isnt a very good thing to use. Anyways...i tried changing the numbers....and it worked! Thanx! even though, i decided to trash that whole script, and make a new one, which is like 5 times better, 1/2 the length, and took me 5 minutes to make. Thanx for your help!
__________________
I speek on behalf of my staff.
~laterz

Lagoonia Staff
-Tiki God Of Power
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:29 AM.


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