Landera
Veteran OT User
- Joined
- Nov 24, 2011
- Messages
- 905
- Solutions
- 1
- Reaction score
- 318
Hello I'd like to share this little change gender rune I saw this new item en thought of this right away, very easy to script but maybe somebody likes it anyway
This in your action.xml
<data\actions\scripts\tools>
changesexrune.lua
It works like a rune you have to use it on yourself and done ur done for 2020.
This in your action.xml
XML:
<action itemid="32605" script="tools/changesexrune.lua" />
<data\actions\scripts\tools>
changesexrune.lua
XML:
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
if type(target) == "userdata" and not target:isPlayer() then
return false
end
if player:getGroup():getAccess() then
player:setSex(player:getSex() == PLAYERSEX_FEMALE and PLAYERSEX_MALE or PLAYERSEX_FEMALE)
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have changed your sex.")
player:getPosition():sendMagicEffect(CONST_ME_HOLYAREA)
item:remove(1)
return true
end
end
It works like a rune you have to use it on yourself and done ur done for 2020.
Last edited: