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

addDialog function

NewMan

New Member
Joined
Jun 22, 2013
Messages
8
Reaction score
0
Is it possible to add in sources or something this function on servers below tibia 9.7? In 8.54, for example? Something like that would me great :P

an example of use of this function:
Code:
modaldialog1 = {
	title = "Offline Training",
	message = "Para qual sala você quer ir?",
	buttons = {
		{ id = 1, value = "Ir" },
	},
	buttonEnter = 1,
	choices = {
		{ id = 1, value = "Sword" },
		{ id = 2, value = "Axe" },
		{ id = 3, value = "Club" },
		{ id = 4, value = "Distance" },
		{ id = 5, value = "Magic Level" }
	},
	popup = false
}


function callback1(cid, button, choice)
	if button == 1 or button == 29 or button == 0 then
		local pos = 0
		if (choice == 1) then
			pos = {x=98, y=45, z=15}
		end
		if (choice == 2) then
			pos = {x=108, y=45, z=15}
		end
		if (choice == 3) then
			pos = {x=117, y=45, z=15}
		end
		if (choice == 4) then
			pos = {x=98, y=55, z=15}
		end
		if (choice == 5) then
			pos = {x=117, y=55, z=15}
		end
		doTeleportThing(cid, pos)
	end
end

function onStepIn(cid, item, position, fromPosition, itemEx)
	addDialog(modaldialog1, 1001, cid, callback1);
end

x25.png


Thanks
 
You can rewrite everything so it works with 9.7 client but looks like 8.54 otherwise it is impossible.
 
Back
Top