 |
OTS Red Castle Forum Red Castle
|
Zobacz poprzedni temat :: Zobacz następny temat |
Autor |
Wiadomość |
son_of_sillve
Miotacz Postów
Dołączył: 09 Kwi 2007
Posty: 167
Przeczytał: 0 tematów
Ostrzeżeń: 0/5 Skąd: Z Nienacka
|
Wysłany: Sob 14:14, 12 Maj 2007 Temat postu: Skrypt na zmianę 'waluty' po użyciu |
|
|
Wiem, że w Darkoni był jakiś bug z kasą... te skrypty na moim ots przynajmniej nie sprawiają problemów
robimy plik gold.lua i wklejamy to:
Kod: |
function onUse(cid, item, frompos, item2, topos)
if item.itemid == 2148 and item.type == 100 then
doRemoveItem(item.uid,item.type)
doPlayerAddItem(cid,2152,1)
doPlayerSendTextMessage(cid,22,"You have changed 100 gp to 1 platnium coin")
elseif item.itemid == 2148 and item.type < 100 then
doPlayerSendTextMessage(cid,22,"You have to got 100 gp's to change for platinum coin")
end
end
|
następnie robimy plik platinum.lua i wklejamy to:
Kod: |
function onUse(cid, item, frompos, item2, topos)
if item.itemid == 2152 and item.type == 100 then
doRemoveItem(item.uid,item.type)
doPlayerAddItem(cid,2160,1)
doPlayerSendTextMessage(cid,22,"You have changed 100 platinum to 1 crystal coin")
elseif item.itemid == 2152 and item.type < 100 then
doRemoveItem(item.uid,1)
doPlayerAddItem(cid,2148,100)
doPlayerSendTextMessage(cid,22,"You have changed 1 platinum to 100 gold coins")
end
end
|
do actions.xml dodajemy:
Kod: |
<action itemid="2148" script="gold.lua" />
<action itemid="2152" script="platinum.lua" />
|
dziękuję i do zobaczenia ponownie ;]
Post został pochwalony 0 razy
|
|
Powrót do góry |
|
 |
|
 |
|
|
Możesz pisać nowe tematy Możesz odpowiadać w tematach Nie możesz zmieniać swoich postów Nie możesz usuwać swoich postów Nie możesz głosować w ankietach
|
fora.pl - załóż własne forum dyskusyjne za darmo
Powered by phpBB © 2001, 2002 phpBB Group
|