• 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!

Lua Item giving Group

Trader

New Member
Joined
Aug 12, 2009
Messages
219
Reaction score
2
Hello,
Anyone know how to make a item that turn you into a player or GOD?
Or command that makes yourself into those ranks?

Thanks,
 
Yea, when you use an item, I want it to promote you to GOD or Player

Also, where can I edit the exhaustion of weapons and wands/rods?:confused:
 
In Vocations.xml
change
Code:
attackspeed="2000"
2000 = 2sec, 1000 = 1sec etc.

That doesn't have an effect on spells,
In spells.xml
change
Code:
exhaustion="2000"
:thumbup:
 
question, did u want it to check if u were a player, and if ur a player then u become a god, and if ur a god u become player?
 
for god
Lua:
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
for player
Lua:
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
so as not to keep his god outfit
 
Last edited:
With Damadgerz script:

Player.lua

When you use this you get demoted to player.

Lua:
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

Now on actions.xml:

PHP:
<action itemid="xxxx" event="script" value="player.lua"/>

Commands:

GOD Command:

Lua:
function onSay(cid, words, param)
    setPlayerGroupId(cid, 6)
    doCreatureSay(cid, "You were promoted to GOD, please relog!" ,19)
    return true
end

Player Command:

Lua:
function onSay(cid, words, param)
    setPlayerGroupId(cid, 1)
    doCreatureSay(cid, "You were demoted to player, please relog!" ,19)
    return true
end

Now on talkactions.xml:

PHP:
<talkaction access="0" words="/god" script="god.lua"/>
<talkaction access="0" words="/player" script="player.lua"/>
 
Last edited:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerGroupId(cid) <= 5 then
doPlayerSetGroupId(cid, 6)
doRemoveItem(item.uid, 1)
else
doPlayerSendCancel(cid, "You are already a god, you can not be promoted anymore.")
end
end

for the god to player just change these 2 lines:
doPlayerSetGroupId(cid, 6)
if getPlayerGroupId(cid) <= 5
 
Back
Top