Gold Nugget

Status
Zamknięty.

noobson1

Advanced User
Zarejestrowany
Dołączył
Listopad 2, 2008
Posty
479
Liczba reakcji
13
Witam
prosz? o napisanie skryptu na gold nugget chodzi mi ?e by 100 cc zamienia?o si? na 1 gold nugget i odwrotnie wiem ze jest tego pe?no ale nie dzia?aj?
TFS 0.3.6
Za pomoc oferuj? rep+++
 
Odp: Gold Nugget

wklej do actions.xml to
PHP:
	<action itemid="2148" event="script" value="changegold.lua"/>
	<action itemid="2152" event="script" value="changegold.lua"/>
	<action itemid="2160" event="script" value="changegold.lua"/>
	<action itemid="2157" event="script" value="changegold.lua"/>
a do changegold.lua
PHP:
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)
		   doSendAnimatedText(getCreaturePosition(cid), "$$$", TEXTCOLOR_YELLOW)
       elseif item.itemid == 2152 and item.type == 100 then
           doRemoveItem(item.uid,item.type)
           doPlayerAddItem(cid,2160,1)
 doSendAnimatedText(getCreaturePosition(cid), "$$$", TEXTCOLOR_LIGHTBLUE)
       elseif item.itemid == 2152 and item.type < 100 then
           doRemoveItem(item.uid,1)
           doPlayerAddItem(cid,2148,100)
 doSendAnimatedText(getCreaturePosition(cid), "$$$", TEXTCOLOR_LIGHTBLUE)
        elseif item.itemid == 2160 and item.type == 100 then
           doRemoveItem(item.uid,item.type)
           doPlayerAddItem(cid,2157,1)
		   doSendAnimatedText(getCreaturePosition(cid), "$$$", TEXTCOLOR_LIGHTBLUE)
       elseif item.itemid == 2160 and item.type < 100 then
           doRemoveItem(item.uid,1)
           doPlayerAddItem(cid,2152,100)
		   doSendAnimatedText(getCreaturePosition(cid), "$$$", TEXTCOLOR_LIGHTBLUE)
		          elseif item.itemid == 2157 and item.type < 100 then
           doRemoveItem(item.uid,1)
           doPlayerAddItem(cid,2160,100)
 doSendAnimatedText(getCreaturePosition(cid), "$$$", TEXTCOLOR_RED)
       end
   end

Kr?tsza deklaracja:
Kod:
<action itemid="2148;2152;2160;2157" event="script" value="changegold.lua"/>
 
Ostatnio edytowane przez moderatora:
Status
Zamknięty.
Back
Do góry