Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Some help with this script? (https://forums.graalonline.com/forums/showthread.php?t=36830)

zell12 08-29-2002 01:26 AM

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;
}


Graal518 08-29-2002 01:54 AM

You're missing a bracket, silly.
PHP Code:

if (playerenters || timeout) {
   if (
strtofloat(#s(clientr.hp))<=20) {
      
setlevel2 worldl-17.nw,27.5,29;
   }



zell12 08-29-2002 02:21 AM

oh lord.... lol

Spark910 08-29-2002 02:40 AM

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.....

emortylone 08-29-2002 02:59 AM

x.X Does it work after you did that? he he, it has a health string =P
---Shifter

zell12 08-29-2002 08:07 AM

nope, I just rescripted it.

emortylone 08-29-2002 08:22 AM

LOLz, well g/l with the scripting then =P
---Shifter

phrost-byte 08-30-2002 01:26 PM

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;
}


King_Arthur_Elven 08-30-2002 05:54 PM

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

SetezGraal 08-30-2002 06:08 PM

credit
 
taking credits bad =O

Dragona2002 08-30-2002 10:14 PM

if (playerenters || timeout) {
if (strtofloat(#s(cliente.hp))<=20) {
setlevel2 worldl-17.nw,27.5,29;
}
}

should work X.x


All times are GMT +2. The time now is 01:34 PM.

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