Forum

> > CS2D > Scripts > how to make a buy menu??
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch how to make a buy menu??

3 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt how to make a buy menu??

Kristian Lim
User Off Offline

Zitieren
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

alt Re: how to make a buy menu??

Dovahkin
User Off Offline

Zitieren
Use trigger_use and get the coordinates of the x and y. Put this 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

alt Re: how to make a buy menu??

alex72super
User Off Offline

Zitieren
You can use this one aswell:

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.
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht