- Dołączył
- Czerwiec 16, 2008
- Posty
- 32
- Liczba reakcji
- 1
Siemanko przedstawiam skrypt do pokemon ots'a box system to jedziemy
tworzymy nowy plik o nazwie box.lua w data/actions/scripts i zawartosc tego kodu wklejamy :
ktory trzeba poziom zeby go uzyc
ID box'u
Nazwa pokemona ktora ma wyskakiwac
ID Pokeballa
Script by Aksz
tworzymy nowy plik o nazwie box.lua w data/actions/scripts i zawartosc tego kodu wklejamy :
nastepnie otwieramy plik actions.xml data/actions i wklejamy ten kod :function onUse(cid, item, frompos, item2, topos)
r1 = math.random(1,3)
if getPlayerLevel(cid) >= 60 then
if doPlayerRemoveItem(cid,7884,1) == TRUE then
if r1 == 1 then
doPlayerSendTextMessage(cid,22,"Gratulacje trafil ci sie Porygon.")
doPlayerAddItem(cid,2128,1)
elseif r1 == 2 then
doPlayerSendTextMessage(cid,22,"Gratulacje trafil ci sie Hitmonchan.")
doPlayerAddItem(cid,2129,1)
elseif r1 == 3 then
doPlayerSendTextMessage(cid,22,"Gratulacje trafil ci sie Hitmonlee.")
doPlayerAddItem(cid,2130,1)
end
end
end
end
Konfiguracja skryptu :<action itemid="7884" event="script" value="box.lua"/>
Kt?ry boxfunction onUse(cid, item, frompos, item2, topos)
r1 = math.random(1,3)
if getPlayerLevel(cid) >= 60 then
if doPlayerRemoveItem(cid,7884,1) == TRUE then
if r1 == 1 then
doPlayerSendTextMessage(cid,22,"Gratulacje trafil ci sie Porygon.")
doPlayerAddItem(cid,2128,1)
elseif r1 == 2 then
doPlayerSendTextMessage(cid,22,"Gratulacje trafil ci sie Hitmonchan.")
doPlayerAddItem(cid,2129,1)
elseif r1 == 3 then
doPlayerSendTextMessage(cid,22,"Gratulacje trafil ci sie Hitmonlee.")
doPlayerAddItem(cid,2130,1)
end
end
end
end
ktory trzeba poziom zeby go uzyc
ID box'u
Nazwa pokemona ktora ma wyskakiwac
ID Pokeballa
Script by Aksz

. Lecz nie testowany. Ale powinien w 100% dzia?a?. Do mojego skryptu mo?na doda? niesko?czenie wiele pokeballi.