• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Compiling Gain full hp after death. What command should I use?

Gothric

New Member
Joined
Feb 6, 2010
Messages
264
Reaction score
1
I want to do in sources that after death we dont see 'you are death..' window..

I did that we dont see this window and we get tp to the temple but we still have 0 hp and i cannot move becouse it still tp me :D

i think that i used wrong comand
g_game.addCreatureHealth(this);

so what i should paste here?
 
This you can do in LUA.

Simply make an "onPrepareDeath" script, and make so that it heals the player fully, and then teleports them to their temple location.
That way they don't "Die", and they don't get any "You have died" message.
 
man but i must fix that they die and dont see that window :s if u use preparedeath so they dont die and they propabluy dont lose their level :) right?
 
If "onPrepareDeath" returns FALSE instead of TRUE, the player will not die but instead remain with 0 HP.

You can then heal their HP full, and teleport them to the temple. Then they will not die, and they will not see the "You have died" window.

And since they do not die, they will also not loose any exp (and thus no level loss), and they will not loose skills or magic level.
 
Well good luck with that, sweetie.

I'll stop making posts when you learn proper english, how about that? :)
 
if you need login script make like login2.lua in creaturescript/globalevent

Lua:
function onLogin(cid)
  if isCreature(cid) and getCreatureGroupAccess(cid,1) then
  doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
else
return   doPlayerSendCancel(cid, Sorry, you are an high group id then 1.)
end
end
 
if you need login script make like login2.lua in creaturescript/globalevent

Lua:
function onLogin(cid)
  if isCreature(cid) and getCreatureGroupAccess(cid,1) then
  doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
else
return   doPlayerSendCancel(cid, Sorry, you are an high group id then 1.)
end
end

://////////
 
Back
Top