Modcraft - The community dedicated to quality WoW modding!
Community => Showoff - what you are working on => Topic started by: Kian on March 12, 2010, 08:27:10 pm
-
Hey I wanted to show you this revive script. You have to write #revive in chat, and you get revived.
local messagee = "#revive"
function revive_function(event, player, message, type, language)
if (message == messagee) then
if (player:IsDead() == true) then
player:SendBroadcastMessage("You got revived")
player:FullCastSpell(32343)
player:ResurrectPlayer(player)
elseif (player:IsDead() == false) then
player:SendBroadcastMessage("You are not dead!")
else
return
end
end
end
RegisterServerHook(16, "revive_function")
This script will only check if the player is dead or not. But this will only check is he is dead.
local messagee = "#revive"
function revive_function(event, player, message, type, language)
if (message == messagee) then
if (player:IsDead() == true) then
player:SendBroadcastMessage("You got revived!")
player:FullCastSpell(32343)
player:ResurrectPlayer(player)
else
player:SendBroadcastMessage("You are not dead!")
end
end
end
RegisterServerHook(16, "revive_function")
Have fun
-
A boolean value can only have two values: true or false. The first piece is just the same as the second one.
-
I know it schlumpf.