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 08-29-2002, 01: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
Some help with this script?

Well, This script was tested on Graal2001 by Rabid, and he says it works perfect there. But on Frolic, it wont.
It is supposed to warp the player to a level if they have below 20hp, but it won't work
Can someone see whats wrong and post a working script.
NPC Code:
if (playerenters || timeout) {
if (strtofloat(#s(clientr.hp))<=20) {
setlevel2 worldl-17.nw,27.5,29;
}

__________________
Reply With Quote
  #2  
Old 08-29-2002, 01:54 AM
Graal518 Graal518 is offline
Foolish Dreamer
Graal518's Avatar
Join Date: Dec 2001
Location: Montana
Posts: 2,140
Graal518 is on a distinguished road
You're missing a bracket, silly.
PHP Code:
if (playerenters || timeout) {
   if (
strtofloat(#s(clientr.hp))<=20) {
      
setlevel2 worldl-17.nw,27.5,29;
   }

__________________


Can there be a guiding light I've yet to see? I know my heart should guide me, but...
Reply With Quote
  #3  
Old 08-29-2002, 02:21 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
oh lord.... lol
__________________
Reply With Quote
  #4  
Old 08-29-2002, 02:40 AM
Spark910 Spark910 is offline
Ex-Graal Global
Spark910's Avatar
Join Date: Oct 2001
Location: England
Posts: 10,892
Spark910 has a spectacular aura about
Why is that bit orange, only need the { on end to be Orange, you confused me by doing all that I thought you ment a ( or ) and I though ''No he hasn't''! Oh well.....
Reply With Quote
  #5  
Old 08-29-2002, 02:59 AM
emortylone emortylone is offline
Registered User
Join Date: Apr 2002
Location: Control-NPC
Posts: 834
emortylone is on a distinguished road
x.X Does it work after you did that? he he, it has a health string =P
---Shifter
__________________
Quote:
*Stefan: it seems sometimes they hire newbie scripters everywhere x-x
*Stefan: scripters are sometimes like people that draw paintings
*Stefan: all that counts is that it looks nice
Reply With Quote
  #6  
Old 08-29-2002, 08:07 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
nope, I just rescripted it.
__________________
Reply With Quote
  #7  
Old 08-29-2002, 08:22 AM
emortylone emortylone is offline
Registered User
Join Date: Apr 2002
Location: Control-NPC
Posts: 834
emortylone is on a distinguished road
LOLz, well g/l with the scripting then =P
---Shifter
__________________
Quote:
*Stefan: it seems sometimes they hire newbie scripters everywhere x-x
*Stefan: scripters are sometimes like people that draw paintings
*Stefan: all that counts is that it looks nice
Reply With Quote
  #8  
Old 08-30-2002, 01:26 PM
phrost-byte phrost-byte is offline
Registered User
Join Date: Nov 2001
Location: New York
Posts: 133
phrost-byte is on a distinguished road
Send a message via AIM to phrost-byte
here, this works just as well (for NPC server that is) >=/

NPC Code:

if (playerenters || timeout) {
for (i=0;i<=playerscount;i++) {
with (players[i]) {
if (playerhearts<=0) {
setlevel2 worldl-17.nw,27.5,29;}
}
}
timeout=0.5;
}

__________________
Knuckles
// -- A scripter guy
Reply With Quote
  #9  
Old 08-30-2002, 05:54 PM
King_Arthur_Elven King_Arthur_Elven is offline
Banned
Join Date: May 2002
Posts: 125
King_Arthur_Elven is on a distinguished road
Send a message via AIM to King_Arthur_Elven
Phrost

Knuckles..I scripted that for your little game why you going takeing credit? huh huh huh come on huh hahai dont care im just tired bye nite w/e
Reply With Quote
  #10  
Old 08-30-2002, 06:08 PM
SetezGraal SetezGraal is offline
Registered User
Join Date: Aug 2002
Location: Byesville
Posts: 34
SetezGraal is on a distinguished road
Send a message via AIM to SetezGraal Send a message via Yahoo to SetezGraal
Red face credit

taking credits bad =O
__________________

Anything is loveable if they love you.

When you believe,they believe,if you believe in good then you can make a world a better place
-Setez
Reply With Quote
  #11  
Old 08-30-2002, 10:14 PM
Dragona2002 Dragona2002 is offline
Registered User
Join Date: May 2002
Location: The Netherlands
Posts: 105
Dragona2002 is on a distinguished road
Send a message via AIM to Dragona2002 Send a message via Yahoo to Dragona2002
if (playerenters || timeout) {
if (strtofloat(#s(cliente.hp))<=20) {
setlevel2 worldl-17.nw,27.5,29;
}
}

should work X.x
__________________

Quote:
The Dark Nemesis begins.......
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 02:40 AM.


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