Zyntax
*WannaBe Scripter*
The outcome of a misunderstood request must not always be for nothing.
I'm releasing this code just for the lulz of it, no usefull or hyper-cypher code, just for fun.
I misunderstood the request of a user for a script and that was the outcome...
What does it do?
Transforms you into a monster and sends effect for each step you take.
Dragon Animation
Witch Animation
Again, there's no serious coding behind it, I'm just sharing it because I thought someone may need it sometime...
Implemenation
talkactions.xml
talkactions/scripts/ change.lua
Should be selfexplaining...
I don't know if anyone would need that...
I'm releasing this code just for the lulz of it, no usefull or hyper-cypher code, just for fun.
I misunderstood the request of a user for a script and that was the outcome...
What does it do?
Transforms you into a monster and sends effect for each step you take.
Dragon Animation

Witch Animation

Again, there's no serious coding behind it, I'm just sharing it because I thought someone may need it sometime...
Implemenation
talkactions.xml
XML:
<talkaction words="!change" event="script" value="change.lua"/>
talkactions/scripts/ change.lua
LUA:
local seconds = 20 --how long the transform effect lasts
--Conditions (dragon, dragonlord, add what you want)
local dragon = createConditionObject(CONDITION_OUTFIT)
setConditionParam(dragon, CONDITION_PARAM_TICKS, 1000*seconds)
addOutfitCondition(dragon, 0, 34, 0, 0, 0, 0) --34 = outfitID of a dragon
local dragonLord = createConditionObject(CONDITION_OUTFIT)
setConditionParam(dragonLord, CONDITION_PARAM_TICKS, 1000*seconds)
addOutfitCondition(dragonLord, 0, 39, 0, 0, 0, 0) --39 = outfitID of a dragonlord
local witch = createConditionObject(CONDITION_OUTFIT)
setConditionParam(witch, CONDITION_PARAM_TICKS, 1000*seconds)
addOutfitCondition(witch, 0, 54, 0, 0, 0, 0) --54 = outfitID of a witch
--End Conditions
local outfits = {
["dragon"] = {effect = CONST_ME_EXPLOSIONHIT, text = "Rrrrooaarr!", condition = dragon, look = 34},
["dragonlord"] = {effect = CONST_ME_EXPLOSIONHIT, text = "Ggrraahh!", condition = dragonLord, look = 39},
["witch"] = {effect = CONST_ME_BATS, text = "Hihihihih!", condition = witch, look = 54}
}
function effect(cid, u, pos)
if u.look == getCreatureOutfit(cid).lookType then
local k = getThingPos(cid)
if k.x ~= pos.x or k.y ~= pos.y or k.z ~= pos.z then
doSendMagicEffect(k, u.effect)
end
addEvent(effect, 100, cid, u, k)
end
end
function onSay(cid, words, param)
if param == '' then
return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have to define a valid monstername.")
end
local u = outfits[string.lower(param)]
if u then
doPlayerSay(cid, u.text, 19)
doAddCondition(cid, u.condition)
effect(cid, u, {x=0, y=0, z=0})
else
return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "This monster outfit is not available.")
end
return true
end
Should be selfexplaining...
I don't know if anyone would need that...