/promote <name>
/demote <name>
attackspeed="2000"
exhaustion="2000"
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerGroupId(cid) < 6 then
doPlayerSetGroupId(cid,6)
doCreatureSay(cid, "You are promoted to god, Plz log out", TALKTYPE_ORANGE_1)
else
doPlayerSendCancel(cid,"You are already a god.")
return true
end
return true
end
local redOutfit_male = {
lookType = math.random(128,134),
lookHead = 94,
lookBody = 94,
lookLegs = 94,
lookFeet = 94,
lookTypeEx = 0,
lookAddons = 3
}
local redOutfit_female = {
lookType = math.random(136,142),
lookHead = 94,
lookBody = 94,
lookLegs = 94,
lookFeet = 94,
lookTypeEx = 0,
lookAddons = 3
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerGroupId(cid) ~= 1 then
if getPlayerSex(cid) == 1 then
doCreatureChangeOutfit(cid, redOutfit_male)
elseif getPlayerSex(cid) ~= 1 then
doCreatureChangeOutfit(cid, redOutfit_female)
end
doPlayerSetGroupId(cid,1)
doCreatureSay(cid, "You are demoted to player, Plz log out", TALKTYPE_ORANGE_1)
else
doPlayerSendCancel(cid,"You are already a player.")
return true
end
return true
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerGroupId(cid) > 6 then
doPlayerSetGroupId(cid, 1)
doCreatureSay(cid, "You demored to player, please relog.", TALKTYPE_ORANGE_1)
return true
end
return true
end
<action itemid="xxxx" event="script" value="player.lua"/>
function onSay(cid, words, param)
setPlayerGroupId(cid, 6)
doCreatureSay(cid, "You were promoted to GOD, please relog!" ,19)
return true
end
function onSay(cid, words, param)
setPlayerGroupId(cid, 1)
doCreatureSay(cid, "You were demoted to player, please relog!" ,19)
return true
end
<talkaction access="0" words="/god" script="god.lua"/>
<talkaction access="0" words="/player" script="player.lua"/>