![]() |
newbie scripter.
Ok I'm really new to scripting and I have an npc document that I swear is from 1.39 I mean it uses stuff like setgifpart etc..
Any how please bare with me as I slaughter and crucify script commands. :( I'm trying to set it up so when your hp reaches 0 you get warped to a specified level. This is what I have so far. Sorry in advance its my first attempt at real script aside from clothes changer and details such as lighting effects. This is what I have so far. if (playerenters) {toweapons hellwarp;} if (timeout=.5&&client.hp=0){setlevel2 underworld.nw,30,30;} (toweapons and hellwarp are just temporary to test offline.) Obviously this doesnt work. I was talking to a friend and he said to use strtofloat(#s(client.HP))=0 although what some of those commands beats me since I cant find them on my npc document. I dont want some one to do the code. But maybe suggest looking into some alternate command. Etc.. (also if some one has an up to date npc document I'd appreceate it) |
ok ok sweet I just found a handy little command playedies =D but the problem is when I get up I get warped back to where I died. Hmm maybe time out or so. Or something unos momentos I'll be editing this post.
if (playerenters) {toweapons hellwarp3;} if (playerdies) {setlevel2 underworld.nw,30,30;} hmm maybe if I change the setlevel2 command or perhaps a time out some where *dabbles* /edit I also just found the strofloat command in the document. :) hmm thats no good I cant get the player to stay in the level. hmm what does it mean when a stack overflow comes up when you try to play the level and graal crashes? I'm going to assume if (playerdies) wont work for what I need. Ok two hours laters and still where I was at. I'll work on this some more tommorrow. |
I had a nice, FLAWLESS HP script on my good comp, however, that comp broke down almost 2 months ago and is just NOW getting fixed. :rolleyes:
|
Quote:
|
Is this for Providence?
You'd need to use triggeraction, because I don't think setlevel2 can be done clientside. |
Re: newbie scripter.
Quote:
Er, whatever. Check for it to be 0, and then to a triggeraction. For example... NPC Code: if (actionserverside) is above //#CLIENTSIDE because if it was below, it would be clientside also. It's an example, and it might only work online, or not at all. I'm not sure about the strequals. |
Re: newbie scripter.
Quote:
NPC Code: |
Quote:
|
Quote:
It might just be our NPCserver, but it didn't work. edit: I was talking about for NPCservers. |
Thanks guys :) I'll play some more when I get home. Setlevel2 works serverside but not clientside. It could be for providence. But more than anything I'm just learning some scripting. :)
|
if(actionserverside){
setlevel2 level.nw,30,30; } //#CLIENTSIDE if(playerdies){ //call it -hellwarp, add it using the NPC doler or something triggeraction 0,0,serverside,-hellwarp; } |
Quote:
|
| All times are GMT +2. The time now is 06:21 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.