Exiled Pain
Fervid Learner
- Joined
- Jan 8, 2008
- Messages
- 552
- Reaction score
- 4
plx fix this, it would be real cool if it worked, no mor send to temple talkactios, just plain and simple spells...xD
protectionLevel = 100
function onPrepareDeath(cid, deathList)
if(isPlayer(cid) == true and isPlayer(lastHitKiller) == true and getPlayerLevel(cid) <= protectionLevel) then
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), 1)
doCreatureAddHealth(cid, getCreatureMaxHealth(cid), TRUE)
doRemoveCondition(cid, CONDITION_INFIGHT)
doRemoveCreature(cid)
return false
end
return true
end
@up
Doesn't work at all.
Please, someone fix this!
Why people always get so many people although they just copy and paste....Try to make one yourself. It's kinda easy.
Bump, please someone fix*!
local config = {
exhaustionInSeconds = 420,
storage = 36531
}
function onSay(cid, words, param)
local player = getPlayerByName(param)
if(isPlayer(player) == TRUE) then
if(exhaustion.check(cid, config.storage) == TRUE) then
doPlayerSendCancel(cid, "You can teleport players only 1 time per " .. config.exhaustionInSeconds .. " seconds.")
return TRUE
end
if (getPlayerLevel(cid) > 50) then
if (getPlayerLevel(player) <= 50) then
if(doPlayerAddSoul(cid, -100) == TRUE) then
exhaustion.set(cid, config.storage, config.exhaustionInSeconds)
doTeleportThing(player, getTownTemplePosition(getPlayerTown(player)))
else
doPlayerSendCancel(cid,"You dont have 100 soul points.")
end
else
doPlayerSendCancel(cid,"This player have lvl higher than 50.")
end
else
doPlayerSendCancel(cid,"Your level is too low.")
end
else
doPlayerSendCancel(cid,"This players doesn exist, or is offline.")
end
return TRUE
end
-.-
Here is a script of me but kinda different:
Code:local config = { exhaustionInSeconds = 420, storage = 36531 } function onSay(cid, words, param) local player = getPlayerByName(param) if(isPlayer(player) == TRUE) then if(exhaustion.check(cid, config.storage) == TRUE) then doPlayerSendCancel(cid, "You can teleport players only 1 time per " .. config.exhaustionInSeconds .. " seconds.") return TRUE end if (getPlayerLevel(cid) > 50) then if (getPlayerLevel(player) <= 50) then if(doPlayerAddSoul(cid, -100) == TRUE) then exhaustion.set(cid, config.storage, config.exhaustionInSeconds) doTeleportThing(player, getTownTemplePosition(getPlayerTown(player))) else doPlayerSendCancel(cid,"You dont have 100 soul points.") end else doPlayerSendCancel(cid,"This player have lvl higher than 50.") end else doPlayerSendCancel(cid,"Your level is too low.") end else doPlayerSendCancel(cid,"This players doesn exist, or is offline.") end return TRUE end
This is my script..Remember, it's a talkaction script..
In this Script you can change the exhaustion which means when you can kick some1 after executing the first time, how many soul points it will take and under which level condition people can be kicked..
Rep me++
If this work I will give you so much rep! Thanks
@Up
Code:protectionLevel = 100 function onPrepareDeath(cid, deathList) if(isPlayer(cid) == true and isPlayer(lastHitKiller) == true and getPlayerLevel(cid) <= protectionLevel) then doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), 1) doCreatureAddHealth(cid, getCreatureMaxHealth(cid), TRUE) doRemoveCondition(cid, CONDITION_INFIGHT) doRemoveCreature(cid) return false end return true end
This will work
It will teleport a player to his temple, add hp, remove fight condition and kick
@Down
It's working, I've tested it -.-
Probably you've done something wrong