• 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: A simple outfit script :( Rep!

Printer

if Printer then print("LUA") end
Senator
Premium User
Joined
Dec 27, 2009
Messages
5,780
Solutions
31
Reaction score
2,299
Location
Sweden?
Hello,

I need a script example dragon looktype: 512 dosendmagiceffecttile fire, it means that if the dragon walk it will come fire behind it and i can add outfits into the scripts and add new effects.

If you dont understand please comment.
 
Finished (after quite some hours...)

talkactions.xml
XML:
<talkaction words="!roar" event="script" value="roar.lua"/>
Rename it ~

talkactions/scripts/roar.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

--[[EXAMPEL:
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}
--EXAMPEL (like above)
--  ["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

Pretty selfexplaining.
Have fun ;)
 
Zyntax you didnt understand me, i ment that if i gone hunt dragon when they walk it come fire effect behind them. this should be made at movement :(
 
I give you example: ifgetcreatureoutfit, 512 send fire effect bla bla, when the creaature walk it come fire behind <-- menas movement no talkaction or smth if i want add that bog raider walk then terra effect come behind etc... id of the effect come behind the creature when they walk.
 
Back
Top