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

Stuffed Dragon

Ozo

New Member
Joined
Jun 30, 2008
Messages
58
Reaction score
0
Hello, i would love to have a working stuffed dragon script :)

I have found a script but it creates "Animated text" when you click on them, i want them to display the same text that mobs have, like "doCreatureSay"

I'm willing to play with something, i need to learn too ;P
 
Uhm.. i can probbaly do it. but i don't know what the doll usually does :p mind telling me so i can make?
 
Sure
It's item ID 5791
and when you press the dragon he sais 5 different things, randomly
like "FCHHH" "you...will...burn" etc
from his position, with red creature text

btw, can i have your msn? i promise not to be strenuous :p
 
Yeh you can, sorry i didn't reply very fast i fell asleep at my desk :<
It's ~ Email removed~

Add this to Actions.xml
PHP:
action itemid="5791" script="dragon doll.lua"  />
Make this file in your action scripts folder Dragon doll.lua
PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if fromPosition.x ~= CONTAINER_POSITION then
		if math.random(1, 5) == 1 then
			doCreatureSayWithDistance(cid, fromPosition, "Fchhhhhh!", TALKTYPE_ORANGE_1)
		elseif math.random(1, 5) == 2 then
			doCreatureSayWithDistance(cid, fromPosition, "Zchhhhhh!", TALKTYPE_ORANGE_1)
		elseif math.random(1,5) == 3 then
			doCreatureSayWithDistance(cid, fromPosition, "Grooaaaaar *cough*", TALKTYPE_ORANGE_1)
		elseif math.random(1, 5) == 4 then
			doCreatureSayWithDistance(cid, fromPosition, "Aaa... CHOO!", TALKTYPE_ORANGE_1)
		elseif math.random(1, 5) == 5 then
			doCreatureSayWithDistance(cid, fromPosition, "You... will.... burn!!", TALKTYPE_ORANGE_1)
		end
	else
		if math.random(1, 5) == 1 then
			doCreatureSay(cid, "Fchhhhhh!", TALKTYPE_ORANGE_1)
		elseif math.random(1, 5) == 2 then
			doCreatureSay(cid, "Zchhhhhh!", TALKTYPE_ORANGE_1)
		elseif math.random(1,5) == 3 then
			doCreatureSay(cid, "Grooaaaaar *cough*", TALKTYPE_ORANGE_1)
		elseif math.random(1, 5) == 4 then
			doCreatureSay(cid, "Aaa... CHOO!", TALKTYPE_ORANGE_1)
		elseif math.random(1, 5) == 5 then
			doCreatureSay(cid, "You... will.... burn!!", TALKTYPE_ORANGE_1)
		end
	end
return TRUE
end


Add this to Global.lua
PHP:
function doCreatureSayWithDistance(cid, position, text, type)
	oldPosX = setPlayerStorageValue(cid, 10000, getCreaturePosition(cid).x)
	oldPosY = setPlayerStorageValue(cid, 10001, getCreaturePosition(cid).y)
	oldPosZ = setPlayerStorageValue(cid, 10002, getCreaturePosition(cid).z)
	oldPos = { x = getPlayerStorageValue(cid, 10000), y = getPlayerStorageValue(cid, 10001), z = getPlayerStorageValue(cid, 10002) }
	doTeleportThing(cid, position, 0)
	doCreatureSay(cid, text, type)
	return doTeleportThing(cid, oldPos, 0)
end
 
Last edited:
Back
Top