What's new

Actions Jak zrobi? kasyno?

Status
Not open for further replies.

Regulamin

User
Joined
Jul 2, 2010
Messages
23
Reaction score
8
Odp: Jak zrobi? kasyno?

Poradnik nie najgorszy, wszystko co mog?e? opisa?e?, z dobra grafik? kt?ra ukaza?a lepsze skojarzenie informacji, teraz kasyna s? na wi?kszo?ci serwerach czyli 50%, ka?dy administrator w?asnego Serwera, pragnie aby jego ots by? lepszy i co najwa?niejsze zach?ca? nas do gry.
#. wracaj?c do tematu, poradnik jest dobry i po?yteczny, wielu z nas z niego na pewno skorzysta?o, niekt?rym co? nie zadzia?a? [ chyba zapisa? dane skrypty lub nie w takiej formie zda? ].
poradnik 8,5/10 .
 

umpalumpa

Banned
Joined
Mar 13, 2010
Messages
91
Reaction score
1
Odp: Jak zrobi? kasyno?

zrobilem jak w poradniku wlaczam ots i dzwignia nawet sie nie rusza. POMOCY!
 

Koozaczeks

Banned
Joined
Jan 28, 2010
Messages
30
Reaction score
1
Odp: Jak zrobi? kasyno?

Bardzo ladny skrypt. Tylko mozesz jeszcze powiedziec pod jaka tibie on dzial?
 

umpalumpa

Banned
Joined
Mar 13, 2010
Messages
91
Reaction score
1
Odp: Jak zrobi? kasyno?

Dzieki Mieteq,uzylem twojego skryptu i wszystko ladnie dziala!
 
Joined
Jun 24, 2010
Messages
46
Reaction score
2
Odp: Jak zrobi? kasyno?

Zrobi?em all i Nie Dzia?a Pokazuje si? to co jest na Screenie @ 3x UP .... Zmienia?em Uniqe ID wiele razy na inne i nie dzia?a :( Pomocy
 

WSeba10

New User
Joined
May 16, 2009
Messages
5
Reaction score
0
Odp: Jak zrobi? kasyno?

POMOCY !
Mam ten sam problem co @Warhammer500
Robi? wszystko jak w instrukcji i mi si? taki b??d pojawia :(
 

zygzagZ

Advanced User
Joined
Aug 14, 2008
Messages
281
Reaction score
34
Odp: Jak zrobi? kasyno?

Pojawiaj? wam si? b??dy, gdy? skrypt jest z?y :]
Brakuje w nim pare "end"?w
M?j skrypt(sam pisa?em):
Code:
local config = {
szansa = 45, -- procent szansy na wygrana
uniques = {
5885 = {{x=0, y=0, z=0, stackpos = 255},{x=0, y=0, z=0}}, --[[ unique id dzwigni = {{pozycja gdzie sie kladzie cc}, {pozycja gdzie sie otrzymuje wygrana}}, ]]--
5886 = {{x=987, y=789, z=6, stackpos = 255}, {x=987, y=788, z=6}}, --[[ np. 5586 = {{x=987, y=789, z=6, stackpos = 255}, {x=987, y=788, z=6}},  stackpos nie ruszac! ]]--
}
id = 2160, -- id crystal coin w twoim ots, domyslnie 2160
text = "Put " -- nie zmieniac
}
local wygrane = {5, 10, 25, 50} -- stawka, wygrana jest zawsze 3x wieksza
function onUse(cid, item, frompos, item2, topos)
    if isInArray(config.uniques, item.uid) then
        local crystal = getThingfromPos(config.uniques[item.uid][1])
        for i = 1, #wygrane do
            if i ~= #wygrane then
                config.text = config.text .. "" .. wygrane[i] .. " or "
            else    
                config.text = config.text .. "" .. wygrane[i] .. " " .. getItemNameById(config.id) .. "" .. (isItemStackable(config.id) and "s" or "") .. " on table"
            end
        end
        if crystal.itemid == config.id then
            rand = math.random(1, 100)
            if isInArray(wygrane, crystal.type) then
                for i = 1, #wygrane do
                    if crystal.type == wygrane[i] then
                        if rand > config.szansa then
                            doRemoveItem(crystal.uid,wygrane[i])
                            doSendMagicEffect(config.pos1,2)
                            doPlayerSendTextMessage(cid,22, "You lose " .. wygrane[i] .. " " .. getItemNameById(config.id) .. "" .. (isItemStackable(config.id) and "s" or "") .. ".")
                            return TRUE
                        else
                            doRemoveItem(pos1.uid,5)
                            doCreateItem(config.id,wygrane[i] * 3,uniques[item.uid][2])
                            doSendMagicEffect(config.pos2,13)
                            doSendMagicEffect(config.pos1,21)
                            doPlayerSendTextMessage(cid,22, "You win " .. wygrane[i] * 3 .. " " .. getItemNameById(config.id) .. "" .. (isItemStackable(config.id) and "s" or "") .. "! Gratulations!")
                            return TRUE
                        end
                    elseif i == #wygrane then
                        doPlayerSendTextMessage(cid,22, config.text)
                    end
                end
            else
                doPlayerSendTextMessage(cid,22, config.text)
            end    
        else
            doPlayerSendTextMessage(cid,22, config.text)
        end
    end
end
 
Last edited:
Joined
Jul 26, 2010
Messages
13
Reaction score
0
Odp: Jak zrobi? kasyno?

SUper poradnik, jak chcecie przetestowac to wbijajcie na mojego otsa , ip na dole :)
 

Oskar

Forum friend
Joined
Jan 24, 2009
Messages
2,256
Reaction score
331
Odp: Jak zrobi? kasyno?

Je?li kto? by chcia?.

Kiedy? zrobi? z tego tablice, a skrypt robiony na 10 minut. Nie wpisujecie ?adnych wsp??rz?dnych, jedyny warunek to taki wygl?d kasyna:
x x L
x P K
x x N
Gdzie:
x - co? blokuj?cego doj?cie,
L - d?wignia z actionid == 6000
P - Player,
K - miejsce gdzie si? k?adzie kask?,
N - miejsce gdzie wygeneruje si? nagroda.
 

19Licha98

Active User
Joined
Apr 23, 2010
Messages
104
Reaction score
3
Odp: Jak zrobi? kasyno?

dzienki za poradnik ch?opie nareszcze po??dnie zrobi?em Kasyno a, reput leci :D
 

TheFearless

New User
Joined
Aug 5, 2010
Messages
9
Reaction score
0
Odp: Jak zrobi? kasyno?

Code:
if getkasa.itemid == 2160 and getkasa.type == 1 or getkasa.itemid == 2160 and getkasa.type == 2 or getkasa.itemid == 2160 and getkasa.type == 3 or getkasa.itemid == 2160 and getkasa.type == 4 or getkasa.itemid == 2160 and getkasa.type == 6 or getkasa.itemid == 2160 and getkasa.type == 7 or getkasa.itemid == 2160 and getkasa.type == 8
or getkasa.itemid == 2160 and getkasa.type == 9 or getkasa.itemid == 2160 and getkasa.type == 11 or getkasa.itemid == 2160 and getkasa.type == 12 or getkasa.itemid == 2160 and getkasa.type == 13 or getkasa.itemid == 2160 and getkasa.type == 14 or getkasa.itemid == 2160 and getkasa.type == 15 or getkasa.itemid == 2160 and getkasa.type == 16
or getkasa.itemid == 2160 and getkasa.type == 17 or getkasa.itemid == 2160 and getkasa.type == 18 or getkasa.itemid == 2160 and getkasa.type == 19 or getkasa.itemid == 2160 and getkasa.type == 20 or getkasa.itemid == 2160 and getkasa.type == 21 or getkasa.itemid == 2160 and getkasa.type == 22 or getkasa.itemid == 2160 and getkasa.type == 23
or getkasa.itemid == 2160 and getkasa.type == 24 or getkasa.itemid == 2160 and getkasa.type == 26 or getkasa.itemid == 2160 and getkasa.type == 27 or getkasa.itemid == 2160 and getkasa.type == 28 or getkasa.itemid == 2160 and getkasa.type == 29 or getkasa.itemid == 2160 and getkasa.type == 30 or getkasa.itemid == 2160 and getkasa.type == 31
or getkasa.itemid == 2160 and getkasa.type == 32 or getkasa.itemid == 2160 and getkasa.type == 33 or getkasa.itemid == 2160 and getkasa.type == 34 or getkasa.itemid == 2160 and getkasa.type == 35 or getkasa.itemid == 2160 and getkasa.type == 36 or getkasa.itemid == 2160 and getkasa.type == 37 or getkasa.itemid == 2160 and getkasa.type == 38
or getkasa.itemid == 2160 and getkasa.type == 39 or getkasa.itemid == 2160 and getkasa.type == 40 or getkasa.itemid == 2160 and getkasa.type == 41 or getkasa.itemid == 2160 and getkasa.type == 42 or getkasa.itemid == 2160 and getkasa.type == 43 or getkasa.itemid == 2160 and getkasa.type == 44 or getkasa.itemid == 2160 and getkasa.type == 45
or getkasa.itemid == 2160 and getkasa.type == 46 or getkasa.itemid == 2160 and getkasa.type == 47 or getkasa.itemid == 2160 and getkasa.type == 48 or getkasa.itemid == 2160 and getkasa.type == 49 or getkasa.itemid == 2160 and getkasa.type > 50 then
doPlayerSendTextMessage(cid,22,"Poloz 5, 10, 25 Lub 50 Crystal Coins :) jezeli Chcesz Wejsc W Gre.")
?miech?em.
Popraw to i to ju?. W skrypcie jest masa podstawowych b??d?w, nie ?atwiej zrobi? tablic?
Code:
local tablica = {10, 20, 50}
A potem:
Code:
if isInArray(kasa) == false then return false end
Rofl ;d
 

Oskar

Forum friend
Joined
Jan 24, 2009
Messages
2,256
Reaction score
331
Odp: Jak zrobi? kasyno?

Kasyno na zasadzie tablic:
PHP:
function onUse(cid, item, frompos, itemEx, topos)
local pos = getCreaturePosition(cid)
local config = {
                [6000] = {pos_kaski={x=pos.x+1,y=pos.y,z=pos.z,stackpos=255}, pos_nagrody={x=pos.x+1,y=pos.y+1,z=pos.z}},
                [6001] = {pos_kaski={x=pos.x,y=pos.y+1,z=pos.z,stackpos=255}, pos_nagrody={x=pos.x+1,y=pos.y+1,z=pos.z}},
                [6002] = {pos_kaski={x=pos.x-1,y=pos.y,z=pos.z,stackpos=255}, pos_nagrody={x=pos.x-1,y=pos.y+1,z=pos.z}},
                [6003] = {pos_kaski={x=pos.x,y=pos.y-1,z=pos.z,stackpos=255}, pos_nagrody={x=pos.x+1,y=pos.y-1,z=pos.z}}
                }
local config_2 = {
                [1] = {ile_cc=5, szansa=20, wygrana=15},
                [2] = {ile_cc=10, szansa=15, wygrana=25},
                [3] = {ile_cc=25, szansa=10, wygrana=50},
                [4] = {ile_cc=50, szansa=5, wygrana=100}
                }
local dzwignia = config[item.actionid]
local position_kasy = getThingFromPos(dzwignia.pos_kaski)
local rand = math.random(1,100)
if dzwignia then
	if item.itemid == 1945 then
		if position_kasy.itemid == 2160 then
			for i=1, #config_2 do
			if position_kasy.type == config_2[i].ile_cc then
				if rand >= config_2[i].szansa then
					doTransformItem(item.uid, item.itemid+1)
					doRemoveItem(position_kasy.uid, config_2[i].ile_cc)
					doSendMagicEffect(dzwignia.pos_kaski, 2)
					doPlayerSendTextMessage(cid, 22, "Straciles "..config_2[i].ile_cc.." Crystal Coins :(.")
					return true
				else
					doTransformItem(item.uid, item.itemid+1)
					doRemoveItem(position_kasy.uid, config_2[i].ile_cc)
					doCreateItem(2160, config_2[i].wygrana, dzwignia.pos_nagrody)
					doSendMagicEffect(dzwignia.pos_nagrody, 13)
					doSendMagicEffect(position_kasy, 21)
					doPlayerSendTextMessage(cid, 22, "Gratulacje Wygrales "..config_2[i].wygrana.." Crystal Coins :).")
					return true
				end
			end
			end
		else
			doPlayerSendTextMessage(cid, 22, "Poloz kase.")
			return true
		end
	elseif item.itemid == 1946 then
		doTransformItem(item.uid, item.itemid-1)
	end
end    
return true
end
Dla kasyn, w kt?rych d?wignia jest u g?ry dajemy aid 6003, dla tych gdzie jest po lewej 6002, dla tej na dole 6001 a tej z prawej 6000.
Wpis do actions.xml:
PHP:
<action fromuid="6000" touid="6003" event="script" value="aaa.lua"/>
Have fun.
 
Last edited:

vexus

New User
Joined
Aug 6, 2009
Messages
3
Reaction score
0
Odp: Jak zrobi? kasyno?

A czy m?g?by kto? doda? do tego kasyna exhausted ? Ja sam nie potrafi? a na pewno utrudni?o by to prac? botom kasynowym.
 

Oskar

Forum friend
Joined
Jan 24, 2009
Messages
2,256
Reaction score
331
Odp: Jak zrobi? kasyno?

PHP:
function onUse(cid, item, frompos, itemEx, topos)
local pos = getCreaturePosition(cid)
local config = {
                [6000] = {pos_kaski={x=pos.x+1,y=pos.y,z=pos.z,stackpos=255}, pos_nagrody={x=pos.x+1,y=pos.y+1,z=pos.z}},
                [6001] = {pos_kaski={x=pos.x,y=pos.y+1,z=pos.z,stackpos=255}, pos_nagrody={x=pos.x+1,y=pos.y+1,z=pos.z}},
                [6002] = {pos_kaski={x=pos.x-1,y=pos.y,z=pos.z,stackpos=255}, pos_nagrody={x=pos.x-1,y=pos.y+1,z=pos.z}},
                [6003] = {pos_kaski={x=pos.x,y=pos.y-1,z=pos.z,stackpos=255}, pos_nagrody={x=pos.x+1,y=pos.y-1,z=pos.z}}
                }
local config_2 = {
                [1] = {ile_cc=5, szansa=20, wygrana=15},
                [2] = {ile_cc=10, szansa=15, wygrana=25},
                [3] = {ile_cc=25, szansa=10, wygrana=50},
                [4] = {ile_cc=50, szansa=5, wygrana=100}
                }
local dzwignia = config[item.actionid]
local position_kasy = getThingFromPos(dzwignia.pos_kaski)
local exhausted_storagevalue = 1006
local exhausted_seconds = 1
local rand = math.random(1,100)
if dzwignia then
	if os.time() > getPlayerStorageValue(cid, exhausted_storagevalue)  then
		if item.itemid == 1945 then
			if position_kasy.itemid == 2160 then
				for i=1, #config_2 do
				if position_kasy.type == config_2[i].ile_cc then
					if rand >= config_2[i].szansa then
						doTransformItem(item.uid, item.itemid+1)
						doRemoveItem(position_kasy.uid, config_2[i].ile_cc)
						doSendMagicEffect(dzwignia.pos_kaski, 2)
						doPlayerSendTextMessage(cid, 22, "Straciles "..config_2[i].ile_cc.." Crystal Coins :(.")
						setPlayerStorageValue(cid, exhausted_storagevalue, os.time() + exhausted_seconds)
						return true
					else
						doTransformItem(item.uid, item.itemid+1)
						doRemoveItem(position_kasy.uid, config_2[i].ile_cc)
						doCreateItem(2160, config_2[i].wygrana, dzwignia.pos_nagrody)
						doSendMagicEffect(dzwignia.pos_nagrody, 13)
						doSendMagicEffect(position_kasy, 21)
						doPlayerSendTextMessage(cid, 22, "Gratulacje Wygrales "..config_2[i].wygrana.." Crystal Coins :).")
						setPlayerStorageValue(cid, exhausted_storagevalue, os.time() + exhausted_seconds)
						return true
					end
				end
				end
			else
				doPlayerSendTextMessage(cid, 22, "Poloz kase.")
				return true
			end
		elseif item.itemid == 1946 then
			doTransformItem(item.uid, item.itemid-1)
		end
	else
		doSendMagicEffect(pos, CONST_ME_POFF)
		doPlayerSendCancel(cid, "You are exhausted.")
	end
end    
return true
end
Prosz?.
 

vexus

New User
Joined
Aug 6, 2009
Messages
3
Reaction score
0
Odp: Jak zrobi? kasyno?

Dzi?ki, ale mi to nie chce dzia?a? :/ Mam tfsa 0.3.6cd i przy poci?gni?ciu za d?wignie w konsoli pojawia si? b??d skryptu:

przechwytywaniexj.png


Lokalizacje i uid pozmienia?em na swoje.

//Jakiego skryptu u?ywasz?

M?j skrypt wygl?da tak:
Code:
function onUse(cid, item, frompos, itemEx, topos) 
local pos = getCreaturePosition(cid) 
local config = { 
                [21701] = {pos_kaski={x=pos.x+1,y=pos.y,z=pos.z,stackpos=255}, pos_nagrody={x=pos.x-1,y=pos.y,z=pos.z}}, 
                [21702] = {pos_kaski={x=pos.x+1,y=pos.y,z=pos.z,stackpos=255}, pos_nagrody={x=pos.x-1,y=pos.y,z=pos.z}},
		[21703] = {pos_kaski={x=pos.x+1,y=pos.y,z=pos.z,stackpos=255}, pos_nagrody={x=pos.x-1,y=pos.y,z=pos.z}}, 
                [21704] = {pos_kaski={x=pos.x+1,y=pos.y,z=pos.z,stackpos=255}, pos_nagrody={x=pos.x-1,y=pos.y,z=pos.z}},
		[21705] = {pos_kaski={x=pos.x-1,y=pos.y,z=pos.z,stackpos=255}, pos_nagrody={x=pos.x+1,y=pos.y,z=pos.z}},
		[21706] = {pos_kaski={x=pos.x-1,y=pos.y,z=pos.z,stackpos=255}, pos_nagrody={x=pos.x+1,y=pos.y,z=pos.z}},
		[21707] = {pos_kaski={x=pos.x-1,y=pos.y,z=pos.z,stackpos=255}, pos_nagrody={x=pos.x+1,y=pos.y,z=pos.z}},
		[21708] = {pos_kaski={x=pos.x-1,y=pos.y,z=pos.z,stackpos=255}, pos_nagrody={x=pos.x+1,y=pos.y,z=pos.z}},
		[21709] = {pos_kaski={x=pos.x,y=pos.y-1,z=pos.z,stackpos=255}, pos_nagrody={x=pos.x,y=pos.y+1,z=pos.z}}
                } 
local config_2 = { 
                [1] = {ile_cc=5, szansa=20, wygrana=15}, 
                [2] = {ile_cc=10, szansa=15, wygrana=25}, 
                [3] = {ile_cc=25, szansa=10, wygrana=50}, 
                [4] = {ile_cc=50, szansa=5, wygrana=100} 
                } 
local dzwignia = config[item.actionid] 
local position_kasy = getThingFromPos(dzwignia.pos_kaski) 
local exhausted_storagevalue = 1006 
local exhausted_seconds = 1 
local rand = math.random(1,100) 
if dzwignia then 
    if os.time() > getPlayerStorageValue(cid, exhausted_storagevalue)  then 
        if item.itemid == 1945 then 
            if position_kasy.itemid == 2160 then 
                for i=1, #config_2 do 
                if position_kasy.type == config_2[i].ile_cc then 
                    if rand >= config_2[i].szansa then 
                        doTransformItem(item.uid, item.itemid+1) 
                        doRemoveItem(position_kasy.uid, config_2[i].ile_cc) 
                        doSendMagicEffect(dzwignia.pos_kaski, 2) 
                        doPlayerSendTextMessage(cid, 22, "Straciles "..config_2[i].ile_cc.." Crystal Coins :(.") 
                        setPlayerStorageValue(cid, exhausted_storagevalue, os.time() + exhausted_seconds) 
                        return true 
                    else 
                        doTransformItem(item.uid, item.itemid+1) 
                        doRemoveItem(position_kasy.uid, config_2[i].ile_cc) 
                        doCreateItem(2160, config_2[i].wygrana, dzwignia.pos_nagrody) 
                        doSendMagicEffect(dzwignia.pos_nagrody, 13) 
                        doSendMagicEffect(position_kasy, 21) 
                        doPlayerSendTextMessage(cid, 22, "Gratulacje wygrales "..config_2[i].wygrana.." Crystal Coins :).") 
                        setPlayerStorageValue(cid, exhausted_storagevalue, os.time() + exhausted_seconds) 
                        return true 
                    end 
                end 
                end 
            else 
                doPlayerSendTextMessage(cid, 22, "Poloz kase.") 
                return true 
            end 
        elseif item.itemid == 1946 then 
            doTransformItem(item.uid, item.itemid-1) 
        end 
    else 
        doSendMagicEffect(pos, CONST_ME_POFF) 
        doPlayerSendCancel(cid, "You are exhausted.") 
    end 
end     
return true 
end
 
Last edited:

Matavx

User
Joined
Nov 15, 2008
Messages
19
Reaction score
0
Odp: Jak zrobi? kasyno?

Super 10/10.Pi?knie to wyt?umaczy?e?.
 

Dartovv

New User
Joined
Feb 21, 2010
Messages
2
Reaction score
0
Odp: Jak zrobi? kasyno?

Ten skrypt nie dzia?a !!!!!!!!!!!!!1
 

filal123

New User
Joined
Jun 8, 2010
Messages
5
Reaction score
0
Odp: Jak zrobi? kasyno?

Kurde Sry za moja siostre dalem jej kompa na sec a ona juz spamu pisze full. Sory za all.
 
Status
Not open for further replies.
Top