What's new

quest z kluczem o action id xxxx

Status
Not open for further replies.

Gratka

Active User
Joined
Aug 9, 2010
Messages
81
Reaction score
1
Jak zrobic questa w ktorym jest klucz o actioc id xxxx zeby otwozyl dzwi? zwykly quest z kluczem da mu action id 0
 

Hilary

Active User
Joined
Aug 13, 2010
Messages
99
Reaction score
9
Odp: quest z kluczem o action id xxxx

Yyy, to grubszy temat.
Ale my?l? ?e mo?esz zrobi? tak:

function onUse(cid, item, frompos, item2, topos)
if item.uid == 2002 then
queststatus = getPlayerStorageValue(cid,15050)
doPlayerSendTextMessage(cid,22,"You have found a Key.")
doPlayerAddItem(cid,xxxx,1)
setPlayerStorageValue(cid,15050,1)
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end
return 1
else
return 0
end
end


xxxx

W tym przypadku dajesz tak ID Silver Keya.
Ma on np : 3348

Dajesz takie same w drzwiach i tyle.
B?d? tworzysz nowy klucz w items.xml.

Pozdrawiam,
Hilary
 

Sensi89

Advanced User
Joined
May 8, 2010
Messages
209
Reaction score
15
Odp: quest z kluczem o action id xxxx

Yyy, to grubszy temat.
Ale my?l? ?e mo?esz zrobi? tak:
xxxx
W tym przypadku dajesz tak ID Silver Keya.
Ma on np : 3348
Dajesz takie same w drzwiach i tyle.
B?d? tworzysz nowy klucz w items.xml.
Pozdrawiam,
Hilary
Poucz si? Lua bo jak widz? nie masz zielonego poj?cia co piszesz nawet aid nie zadeklarowa?e? nigdzie.
Skrypt nie jest trudny ale nie testowa?em go i je?li b?d? z nim jakie? problemy to pisz.
PHP:
function onUse(cid, item, frompos, item2, topos)
local id_skrzyni = 2002
local key-aid = 1000
local storage = 5000
if item.uid == id_skrzyni and getPlayerStorageValue(cid, storage) == -1 then   
    local key = doPlayerAddItem(5785, 1)
    doItemSetAttribute(key, "aid", key-aid)
    setPlayerStorageValue(cid, storage,1) 
end
return TRUE
end
 

Yoxino

Advanced User
Joined
Aug 12, 2009
Messages
478
Reaction score
51
Odp: quest z kluczem o action id xxxx

@UP kolega nawet si? zna, ale poda? b??dne u?ycie funkcji. Mo?e przez przypadek :)
PHP:
local key = doPlayerAddItem(5785, 1)
na
PHP:
local key = doPlayerAddItem(cid, 5785, 1)

Nie jest to nic wielkiego, lecz bez tego kompilator lua nie pu?ci tego skryptu do gry.

Pozdrawiam!
Yoxino
 
Status
Not open for further replies.
Top