RHTM
Hoster
Joined: 14 Feb 2007
Posts: 1341
Read: 0 topics
Warns: 0/5 Location: Wrocław
|
Posted: Sat 13:47, 07 Apr 2007 Post subject: [lua][7.6]Book Quests |
|
|
Jak mozemy pomoc wykonac quest? Proste dac w poblizu ksiazke z wzkazowka ;)
Najpierw musimy miec to, zwroc uwage tam gdzie jest:
Code: |
doShowTextWindow(item.uid,1000,1) |
to 1000 znaczy ze w ksiazke moze byc max 1000 znakow, moznac dac 10000 lub wiece ;-)
Wiec tak potrzebujemy to:
W data\actions\scripts tworzymy rwitems.lua
Code: |
function onUse(cid, item, frompos, item2, topos)
rw = getItemRWInfo(item.uid)
if (rw and 1) then
if (rw and 2) then
doShowTextWindow(item.uid,1000,1)
else
doShowTextWindow(item.uid,0,0)
end
else
if (item.itemid == 2598) then
doShowTextWindow(item.uid,0,0)
end
end
return 1
end |
actions.xml
Code: |
<action itemid="1947" script="rwitems.lua" />
<action itemid="1954" script="rwitems.lua" />
<action itemid="2597" script="rwitems.lua" />
<action itemid="2598" script="rwitems.lua" />
<action itemid="2599" script="rwitems.lua" />
<action itemid="1948" script="rwitems.lua" />
<action itemid="1949" script="rwitems.lua" />
<action itemid="1950" script="rwitems.lua" />
<action itemid="1951" script="rwitems.lua" />
<action itemid="1952" script="rwitems.lua" />
<action itemid="1953" script="rwitems.lua" />
<action itemid="1955" script="rwitems.lua" />
<action itemid="1956" script="rwitems.lua" />
<action itemid="1957" script="rwitems.lua" />
<action itemid="1958" script="rwitems.lua" />
<action itemid="1959" script="rwitems.lua" />
<action itemid="1960" script="rwitems.lua" />
<action itemid="1961" script="rwitems.lua" />
<action itemid="1962" script="rwitems.lua" />
<action itemid="1963" script="rwitems.lua" />
<action itemid="1964" script="rwitems.lua" />
<action itemid="1965" script="rwitems.lua" />
<action itemid="1966" script="rwitems.lua" />
<action itemid="1967" script="rwitems.lua" />
<action itemid="1968" script="rwitems.lua" />
<action itemid="1969" script="rwitems.lua" />
<action itemid="1970" script="rwitems.lua" />
<action itemid="1971" script="rwitems.lua" />
<action itemid="1972" script="rwitems.lua" />
<action itemid="1973" script="rwitems.lua" />
<action itemid="1974" script="rwitems.lua" />
<action itemid="1975" script="rwitems.lua" />
<action itemid="1976" script="rwitems.lua" />
<action itemid="1977" script="rwitems.lua" />
<action itemid="1978" script="rwitems.lua" />
<action itemid="1979" script="rwitems.lua" />
<action itemid="1980" script="rwitems.lua" />
<action itemid="1981" script="rwitems.lua" />
<action itemid="1982" script="rwitems.lua" />
<action itemid="1983" script="rwitems.lua" />
<action itemid="1984" script="rwitems.lua" />
<action itemid="1985" script="rwitems.lua" />
<action itemid="1986" script="rwitems.lua" /> |
ok teraz na ksiazke:
data\actions\scripts tworzymy bookquest.lua
Code: |
-- book script by Randall
function onUse(cid, item, frompos, item2, topos)
if (item.uid == 5555) then
queststatus = getPlayerStorageValue(cid,5555)
if (queststatus == -1) then
doPlayerSendTextMessage(cid,22,"You have found a book. The papyrus pages are sewn together with a silver thread.")
ksiazka = doPlayerAddItem(cid,1974,1)
doSetItemActionId(ksiazka,5556)
doSetItemSpecialDescription(ksiazka, "a book. Nasza ksiazka xD.")
doSetItemText(ksiazka, "Mamy ksiazke ! ballaballb")
setPlayerStorageValue(cid,5555,1)
else
doPlayerSendTextMessage(cid,22,"The library is empty.")
end
return 0
end
return 1
end |
data\actions.xml
Code: |
<action itemid="1718" script="bookquest.lua" />
<action itemid="1719" script="bookquest.lua" />
<action itemid="1720" script="bookquest.lua" />
<action itemid="1721" script="bookquest.lua" />
<action itemid="1722" script="bookquest.lua" />
<action itemid="1723" script="bookquest.lua" /> |
Skrypt dziala 100%, text jest wykonczony, nie urywa sie w polowie. O to efekt:
na screenie znajduje sie fragment Silmarillionu
SKRYTP by Randall
The post has been approved 0 times
|
|