What's new

Skrypty & Kody Problem z Aren? Svargrond

Status
Not open for further replies.

arti1194

User
Joined
Feb 18, 2009
Messages
30
Reaction score
0
Chc? aby gracz m?g? wzi???: goblet, prezent lub backpack oraz jedn? z broni. W tym skrypcie mo?e wzi??? prezent lub backapack lub jedn? z broni. Dzi?kuj?.


arenareward.lua:
[LUA]function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.actionid >= 42361 and item.actionid <= 42365 and getPlayerStorageValue(cid, 42361) ~= 1 then
local reward = 0
if item.actionid == 42361 then
reward = doCreateItemEx(1990,1)
doAddContainerItem(reward, 7372, 1)
doAddContainerItem(reward, 6569, 10)
doAddContainerItem(reward, 6574, 1)
doAddContainerItem(reward, 2114, 1)
elseif item.actionid == 42362 then
reward = doCreateItemEx(7406,1)
elseif item.actionid == 42363 then
reward = doCreateItemEx(7380,1)
elseif item.actionid == 42364 then
reward = doCreateItemEx(7392,1)
elseif item.actionid == 42365 then
reward = doCreateItemEx(7342,1)
doAddContainerItem(reward, 7365, 100)
doAddContainerItem(reward, 7364, 100)
end
if doPlayerAddItemEx(cid, reward, 0) == RETURNVALUE_NOERROR then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,'You found ' .. getItemName(getThing(reward).uid) .. '.')
setPlayerStorageValue(cid, 42361, 1)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,'You do not have enought capacity or place in backpack.')
end
elseif item.actionid >= 42371 and item.actionid <= 42375 and getPlayerStorageValue(cid, 42371) ~= 1 then
local reward = 0
if item.actionid == 42371 then
reward = doCreateItemEx(1990,1)
doAddContainerItem(reward, 7372, 1)
doAddContainerItem(reward, 6569, 10)
doAddContainerItem(reward, 6574, 1)
doAddContainerItem(reward, 7183, 1)
elseif item.actionid == 42372 then
reward = doCreateItemEx(7384,1)
elseif item.actionid == 42373 then
reward = doCreateItemEx(7389,1)
elseif item.actionid == 42374 then
reward = doCreateItemEx(7415,1)
elseif item.actionid == 42375 then
reward = doCreateItemEx(7342,1)
doAddContainerItem(reward, 7365, 100)
doAddContainerItem(reward, 2547, 100)
doAddContainerItem(reward, 2547, 100)
doAddContainerItem(reward, 2311, 50)
doAddContainerItem(reward, 2304, 50)
end
if doPlayerAddItemEx(cid, reward, 0) == RETURNVALUE_NOERROR then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,'You found ' .. getItemName(getThing(reward).uid) .. '.')
setPlayerStorageValue(cid, 42371, 1)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,'You do not have enought capacity or place in backpack.')
end
elseif item.actionid >= 42381 and item.actionid <= 42385 and getPlayerStorageValue(cid, 42381) ~= 1 then
local reward = 0
if item.actionid == 42381 then
reward = doCreateItemEx(1990,1)
doAddContainerItem(reward, 7372, 1)
doAddContainerItem(reward, 6569, 10)
doAddContainerItem(reward, 6574, 1)
doAddContainerItem(reward, 6568, 1)
elseif item.actionid == 42382 then
reward = doCreateItemEx(7429,1)
elseif item.actionid == 42383 then
reward = doCreateItemEx(7434,1)
elseif item.actionid == 42384 then
reward = doCreateItemEx(7390,1)
elseif item.actionid == 42385 then
reward = doCreateItemEx(7342,1)
doAddContainerItem(reward, 2273, 50)
doAddContainerItem(reward, 2268, 50)
doAddContainerItem(reward, 7443, 1)
doAddContainerItem(reward, 7440, 1)
doAddContainerItem(reward, 6529, 100)
end
if doPlayerAddItemEx(cid, reward, 0) == RETURNVALUE_NOERROR then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,'You found ' .. getItemName(getThing(reward).uid) .. '.')
setPlayerStorageValue(cid, 42381, 1)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,'You do not have enought capacity or place in backpack.')
end
end
return TRUE
end
[/LUA]
 

misztrz440

Banned
Joined
Dec 15, 2012
Messages
1,032
Reaction score
39
Odp: Problem z Aren? Svargrond

[LUA]function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.actionid >= 42361 and item.actionid <= 42365 and getPlayerStorageValue(cid, 42361) ~= 1 then
local reward = 0
if item.actionid == 42361 then
reward = doCreateItemEx(1990,1)
doAddContainerItem(reward, 7372, 1)
doAddContainerItem(reward, 6569, 10)
doAddContainerItem(reward, 6574, 1)
doAddContainerItem(reward, 2114, 1)
elseif item.actionid == 42362 then
reward = doCreateItemEx(7406,1)
elseif item.actionid == 42363 then
reward = doCreateItemEx(7380,1)
elseif item.actionid == 42364 then
reward = doCreateItemEx(7392,1)
elseif item.actionid == 42365 then
reward = doCreateItemEx(7342,1)
doAddContainerItem(reward, 7365, 100)
doAddContainerItem(reward, 7364, 100)
end
if doPlayerAddItemEx(cid, reward, 0) == RETURNVALUE_NOERROR then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,'Yo u found ' .. getItemName(getThing(reward).uid) .. '.')
setPlayerStorageValue(cid, 42361, 1)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,'Yo u do not have enought capacity or place in backpack.')
end
elseif item.actionid >= 42371 and item.actionid <= 42375 and getPlayerStorageValue(cid, 42361) ~= 1 then
local reward = 0
if item.actionid == 42371 then
reward = doCreateItemEx(1990,1)
doAddContainerItem(reward, 7372, 1)
doAddContainerItem(reward, 6569, 10)
doAddContainerItem(reward, 6574, 1)
doAddContainerItem(reward, 7183, 1)
elseif item.actionid == 42372 then
reward = doCreateItemEx(7384,1)
elseif item.actionid == 42373 then
reward = doCreateItemEx(7389,1)
elseif item.actionid == 42374 then
reward = doCreateItemEx(7415,1)
elseif item.actionid == 42375 then
reward = doCreateItemEx(7342,1)
doAddContainerItem(reward, 7365, 100)
doAddContainerItem(reward, 2547, 100)
doAddContainerItem(reward, 2547, 100)
doAddContainerItem(reward, 2311, 50)
doAddContainerItem(reward, 2304, 50)
end
if doPlayerAddItemEx(cid, reward, 0) == RETURNVALUE_NOERROR then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,'Yo u found ' .. getItemName(getThing(reward).uid) .. '.')
setPlayerStorageValue(cid, 42371, 1)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,'Yo u do not have enought capacity or place in backpack.')
end
elseif item.actionid >= 42381 and item.actionid <= 42385 and getPlayerStorageValue(cid, 42361) ~= 1 then
local reward = 0
if item.actionid == 42381 then
reward = doCreateItemEx(1990,1)
doAddContainerItem(reward, 7372, 1)
doAddContainerItem(reward, 6569, 10)
doAddContainerItem(reward, 6574, 1)
doAddContainerItem(reward, 6568, 1)
elseif item.actionid == 42382 then
reward = doCreateItemEx(7429,1)
elseif item.actionid == 42383 then
reward = doCreateItemEx(7434,1)
elseif item.actionid == 42384 then
reward = doCreateItemEx(7390,1)
elseif item.actionid == 42385 then
reward = doCreateItemEx(7342,1)
doAddContainerItem(reward, 2273, 50)
doAddContainerItem(reward, 2268, 50)
doAddContainerItem(reward, 7443, 1)
doAddContainerItem(reward, 7440, 1)
doAddContainerItem(reward, 6529, 100)
end
if doPlayerAddItemEx(cid, reward, 0) == RETURNVALUE_NOERROR then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,'Yo u found ' .. getItemName(getThing(reward).uid) .. '.')
setPlayerStorageValue(cid, 42381, 1)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,'Yo u do not have enought capacity or place in backpack.')
end
end
return TRUE
end[/LUA]

Czyli mo?e wzi?? tylko prezent lub backpack lub bro? o to chodzi?o? (co to goblet?) Wystarczy?o wsz?dzie takie same storage da?.
 

arti1194

User
Joined
Feb 18, 2009
Messages
30
Reaction score
0
Odp: Problem z Aren? Svargrond

Nie, mi chodzi?o o to ?eby gracz m?g? wzi???:
1. Goblet (Puchar) za to odpowiedzialny jest inny skrypt wi?c to nas nie interesuje.
2. Prezent lub Backpack.
3. Jedn? z broni.

Misztrz440 nie umiem lua ale wydaje mi si?, ?e storage jest odpowiedzialne za r??ne poziomy areny. Jednak dzi?kuj? za odpowied?.
 

misztrz440

Banned
Joined
Dec 15, 2012
Messages
1,032
Reaction score
39
Odp: Problem z Aren? Svargrond

A czyli prezent i backpack musz? mie? takie same storage a te bronie inne. Poradzisz sobie zmieniasz tylko storage broni, bo ja nie wiem kt?re to bronie prezenty i backpack nie chce mi si? sprawdza?.
 

arti1194

User
Joined
Feb 18, 2009
Messages
30
Reaction score
0
Odp: Problem z Aren? Svargrond

Dzi?ki za info. Co? b?d? kombinowa? :)
 
Status
Not open for further replies.
Top