• Home
  • Members
  • Team
  • Help
  • Search
  • Register
  • Login
  • Home
  • Members
  • Help
  • Search
Ronit.GAMES RonEngine Support / Wsparcie dla RonEngine Mapping / Tworzenie Map Tworzenie skrzynek Questowych

 
  • 0 Vote(s) - 0 Average
Tworzenie skrzynek Questowych
Ron
Offline

Administrator

Posts: 54
Threads: 29
Joined: Jun 2010
Reputation: 3
#2
14-05-2012, 02:07 PM
Najpierw musimy zdefiniować akcję skryptu dla skrzynki o danym ID (przykładowo 2441) i ActionID (przykładowo 5100). W tym celu edytujemy plik actions/actions.xml i dodajemy rekord (najpierw sprawdzamy czy już go tam nie ma):

Quote:<action itemid="2441" script="chest.lua" />

Dodajemy lub edytujemy plik actions/scripts/chest.lua i dodajemy do niego następującą treść:

Quote:function onUse(cid, item, frompos, item2, topos)
if (getPlayerAccess(cid) > 1) then
return
end

if item.actionid == 5100 then -- Action ID, ktore ustawilismy na mapie
if getPlayerStorageValue(cid, 6000) == -1 then -- ID Questu (musi byc unikalne)
setPlayerStorageValue(cid, 6000, 1)
doPlayerAddItemEx(cid, 4898, 1) -- 4898 to ID przedmiotu nagrody
doPlayerSendTextMessage(cid, 22, 'Zyskales przedmiot questowy!')
else
doPlayerSendTextMessage(cid, 22, 'Wziales juz wczesniej przedmiot questowy.')
end
end
end

Po zrestartowaniu serwera skrzynka po jej użyciu powinna dawać przedmiot o ID 4898.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Messages In This Thread
Tworzenie skrzynek Questowych - by Ron - 14-05-2012, 01:02 PM
RE: Tworzenie skrzynek Questowych - by Ron - 14-05-2012, 02:07 PM
RE: Tworzenie skrzynek Questowych - by Szydlos - 16-05-2012, 06:03 PM

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D - Powered by MyBB

Linear Mode
Threaded Mode