English how to make a buy menu??

3 replies
Goto Page
To the start Previous 1 Next To the start
29.09.13 02:11:15 pm
Up
Kristian Lim
User
Offline Off
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
i dont know what is it but.. im happy
29.09.13 03:26:42 pm
Up
Dovahkin
User
Offline Off
Use trigger_use and get the coordinates of the x and y. Put this code.

Code:
1
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


I don't have time to indent the code because I'm using my tablet.
Use this instead of saying hi. Hahaha
IMG:http://i561.photobucket.com/albums/ss59/killerboy_04/76561198036665859.png
29.09.13 04:50:26 pm
Up
alex72super
User
Offline Off
You can use this one aswell:

Code:
1
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


When you step into tile 20 and 4 this menu appears.
30.09.13 03:16:31 pm
Up
Kristian Lim
User
Offline Off
ok thx all now i can make a npc sell my new item
i dont know what is it but.. im happy
To the start Previous 1 Next To the start