What's new

Skrypt pomoc

Status
Not open for further replies.

Kronusek

New User
Joined
Nov 15, 2010
Messages
3
Reaction score
0
Jestem poczatkujacym skrypterem napisalem skrypt ktory ma dawac mace jak da sie use lever ale cos jest nie tak bardzo prosze o pomoc skrypt dalem do actions
Code:
function onUse(cid, item, frompos, item2, topos)
if item.uid == 9825 then
doPlayerAddItem(uid,2380,1)
else
return 0
end
return 1
end
a tu wpis do actions.xml
Code:
<action itemid="9825" event="script" value="other/additem.lua"/>
 

xKrysteKx

Advanced User
Joined
Oct 5, 2010
Messages
250
Reaction score
29
Odp: Skrypt pomoc

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local mace = 2380

if item.uid == 9825 then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "Otrzymales ".. getItemNameById(mace) ..".")
doPlayerAddItem(cid, mace)
setPlayerStorageValue(cid,87545,1)
else
if getPlayerStorageValue(cid,87545) then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
end
end
return 1
end

Powinno dzia?a?.

Pozdrawiam xKrysteKx!
 
Status
Not open for further replies.
Top