• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Wyrzuca nagrode z questa pod gracza

Status
Not open for further replies.

xexam

New Member
Joined
Aug 3, 2010
Messages
172
Reaction score
2
Witam
Jak zrobic zeby przy otwieraniu skrzynki na quescie, gdy gracz nie ma meijsca w bp ani w eq nie wywalało itema pod gracza, tylko krzyczalo ze nie ma wystarczajaca miejsca by wziac nagrode?:ninja:
 
Witam
Jak zrobic zeby przy otwieraniu skrzynki na quescie, gdy gracz nie ma meijsca w bp ani w eq nie wywalało itema pod gracza, tylko krzyczalo ze nie ma wystarczajaca miejsca by wziac nagrode?:ninja:


W skrypcie sobie dopisać?
 
Sprawdzasz cap gracza i wagę przedmiotów które otrzymasz i jeśli waga jest większa niż posiadany cap to wyświetla komunikat i nie zmienia storage.
 
chce dowiedzieć się co trzeba tam dopisać

No jeśli byś wrzucił skrypt i ładnie poprosił to pewnie byśmy Ci pomogli, a Twoje pytanie brzmi JAK to Ci odpowiedziałem jak.
 
wkleilem link do skryptu, nie wiem czemu nie wyswietliło ;/

local t = {
[6001] = {8001,"magic sword",2400},
[6002] = {8001,"demon armor",2494},
[6003] = {8001,"stonecutter axe",2431},
[6004] = {8001,"annihilation bear",2326},
[6005] = {8002,"emerald sword",8930},
[6006] = {8002,"obsidian truncheon",8928},
[6007] = {8002,"hellforged axe",8924},
[6008] = {8002,"royal crossbow",8851},
[6009] = {8002,"warsinger bow",8854},
[6010] = {8002,"spellbook of dark mysteries",8918},
[6011] = {8002,"master archers armor",8888},
[6012] = {8002,"fireborn giant armor",8881},
[6013] = {8002,"robe of the underworld",8890},
[6014] = {8003,"demon legs",2495},
[6015] = {8003,"rainbow shield",8905},
[6016] = {8003,"spellbook of dark mysteries",8918},
[6017] = {8003,"royal crossbow",8851},
[6018] = {8004,"serpent sword",2409}
}

function onUse(cid,item,fromPosition,itemEx,toPosition)
local v = t[item.uid]
if getPlayerStorageValue(cid,v[1]) == -1 and getPlayerFreeCap(cid) >= (getItemWeightById(v[3])) then
setPlayerStorageValue(cid,v[1],1)
doPlayerAddItem(cid,v[3])
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a " .. v[2] .. "!")
elseif getPlayerStorageValue(cid,v[1]) == 1 then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty")
elseif getPlayerFreeCap(cid) < (getItemWeightById(v[3])) then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You need " .. getItemWeightById(v[3]) .. ".00 oz in order to get the item")
end
return true
end

skrypt brany z tego tematu
 
Status
Not open for further replies.
Back
Top