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

[Request] Add query.

Alucar

New Member
Joined
Nov 18, 2011
Messages
13
Reaction score
2
Hello.

I particularly understand very little of queries, so i came to ask for help to add one in my action.

Action:

function onUse(cid, item, frompos, item2, topos)

local config = {
[7529] = 500,
}

local nivel = 1
local outfit = {lookType = 725}

if getPlayerLevel(cid) == nivel then
if config[item.itemid] ~= getPlayerVocation(cid) then
doRemoveItem(item.uid, 1)
doSetCreatureOutfit(cid, outfit)
doPlayerSetVocation(cid, config[item.itemid])
doPlayerSendTextMessage(cid, 22, "Thank you for contributing to the server! You've become a "..getPlayerVocationName(cid).."!")
else
doPlayerSendTextMessage(cid, 22, "You can not change again the vocation of this character.")
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You need to be level ".. nivel .." in order to change their vocation.")
end
return true
end

The query would be to change the looktype of player in database.
 
Back
Top