how to make a buy menu??
3 replies



29.09.13 02:11:15 pm
i know how to make a menu script but
how to make it like buy menu
Examples is like in tibia when we say hi to npc
pls help me
how to make it like buy menu
Examples is like in tibia when we say hi to npc
pls help me




Use trigger_use and get the coordinates of the x and y. Put this code.
I don't have time to indent the code because I'm using my tablet.
Use this instead of saying hi. Hahaha
Code:
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
addhook("usebutton","but")
function but(id,x,y)
if (x == X coordinate and y == Y coordinate) the
menu(id,"Menu,Npc menu")
end
end
addhook("menu,"md")
function md(id,title,button)
if title == "Menu" then
end
end
function but(id,x,y)
if (x == X coordinate and y == Y coordinate) the
menu(id,"Menu,Npc menu")
end
end
addhook("menu,"md")
function md(id,title,button)
if title == "Menu" then
end
end
I don't have time to indent the code because I'm using my tablet.
Use this instead of saying hi. Hahaha

You can use this one aswell:
When you step into tile 20 and 4 this menu appears.
Code:
1
2
3
4
5
6
2
3
4
5
6
addhook("movetile","tilemove")
function tilemove(id,x,y)
if x == 20 and y == 4 then -- Change the 20 and 4 tile to yours
menu(id,'max,150HP|$1000,200HP|$5000,250HP|$10000') -- Example
end
end
function tilemove(id,x,y)
if x == 20 and y == 4 then -- Change the 20 and 4 tile to yours
menu(id,'max,150HP|$1000,200HP|$5000,250HP|$10000') -- Example
end
end
When you step into tile 20 and 4 this menu appears.



