What's new

Actions Kasyno [TEST854]

Status
Not open for further replies.

qwasniak

Advanced User
Joined
May 9, 2013
Messages
303
Reaction score
7
No cze?? ;)
Napisa?em ostatnio skrypt na w?asn? potrzeb?, mianowicie jest to kasyno !
wi?c ja nie przed?u?am i juz pisz? :
[LUA]local kasapos = {x=1206, y=1313, z=9, stackpos=255}
local winpos = {x=1026, y=1316, z=9}

function onUse(cid, item, frompos, item2, topos)
if item.uid == xxxx then
local getkasa = getThingfromPos(kasapos)
if(getkasa.itemid == 12237 and (getkasa.type == 5 or getkasa.type == 10 or getkasa.type == 15 or getkasa.type == 20)) then
local rand = math.random(4)
if getkasa.type == 5 then wygrana = 10 end
if getkasa.type == 10 then wygrana = 15 end
if getkasa.type == 15 then wygrana = 20 end
if getkasa.type == 20 then wygrana = 30 end

if rand > 3 then
doRemoveItem(getkasa.uid,getkasa.type)
doSendMagicEffect(kasapos,2)
doPlayerSendTextMessage(cid,22,"Nosz kurcze ;/ wlasnie straciles "..getkasa.type.." BD.")
else
doRemoveItem(getkasa.uid,getkasa.type)
doCreateItem(12237,wygrana,winpos)
doSendMagicEffect(winpos,13)
doSendMagicEffect(topos,21)
doPlayerSendTextMessage(cid,22," Brawo ! wygrales "..wygrana.." BD.")
end
else
doPlayerSendTextMessage(cid,22,"Poloz 5, 10, 15 albo 20 Black Diamonds, aby zagrac.")
end
end
return true
end
[/LUA]
No i linijka actions.xml[XML] <action uniqueid="xxxx" script="xxxx.lua" />[/XML]
No to chyba tyle ( Licze na REP + ) ;)
 
Status
Not open for further replies.
Top