enriel
Big L
I need a script that if you reach main land from rook, that if you get below level 6 you get back to rookguard with normal mana etc, so players can't kill themselves until level 1 and get 200 more hp.
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Rook" version="1.0" author="Slaktaren" contact="my ass" enabled="yes">
<event type="login" name="RookingLogin" event="script"><![CDATA[
registerCreatureEvent(cid, "Rook")
return TRUE
]]></event>
<event type="think" name="Rook" event="script"><![CDATA[
local cfg = {
exp = -getPlayerExperience(cid), -- Do not change
rookPos = { posx = XXX, posy = YYY, posz = ZZZ }, -- Rook temple position
rookID = 1, -- The town id of the rook
TP_Effect, -- Effect when teleported
rookVocID = 0, -- ID of No Vocation
rookedLevel = 5, -- Level to get rooked
}
if getPlayerLevel(cid) <= cfg.rookedLevel then
if getPlayerTown(cid) ~= cfg.rookID then
doPlayerAddExperience(cid, cfg.exp)
doPlayerSetVocation(cid, cfg.rookVocID)
doTeleportThing(cid, cfg.rookPos, FALSE)
doPlayerSetTown(cid, cfg.rookID)
doSendMagicEffect(cfg.rookPos, cfg.TP_Effect)
end
end
return TRUE
]]></event>
</mod>
tags, copy again:
[CODE]<?xml version="1.0" encoding="UTF-8"?>
<mod name="Rook" author="Slaktaren" enabled="yes">
<event type="login" name="RookingLogin" event="script"><![CDATA[
registerCreatureEvent(cid, "Rook")
return true
]]></event>
<event type="think" name="Rook" event="script"><![CDATA[
local cfg = {
exp = -getPlayerExperience(cid), -- Do not change
rookPos = { posx = XXX, posy = YYY, posz = ZZZ }, -- Rook temple position
rookID = 1, -- The town id of the rook
TP_Effect, -- Effect when teleported
rookVocID = 0, -- ID of No Vocation
rookedLevel = 5 -- Level to get rooked
}
if getPlayerLevel(cid) <= cfg.rookedLevel then
if getPlayerTown(cid) ~= cfg.rookID then
doPlayerAddExperience(cid, cfg.exp)
doPlayerSetVocation(cid, cfg.rookVocID)
doTeleportThing(cid, cfg.rookPos, FALSE)
doPlayerSetTown(cid, cfg.rookID)
doSendMagicEffect(cfg.rookPos, cfg.TP_Effect)
end
end
return true
]]></event>
</mod>
Oh, will that become a problem?Nothing important,
No, it wouldn't be a problem but you should useOh, will that become a problem?
Well, thank you! Now I know that
Seems to be a nice edtior, is it better than Notepad++?
tags next time you're posting a xml file (like a mod), because newbies run into problems if you use [code=lua] tags.
Also it's not an editor but a comparing tool.
what if i m using mystic spirit?
there u dont have mods folder.
please help