Autor: Backy klik

Licencja: Nie ma

Jest to dobry przedmiot do naszego sklepiku jeśli prowadzimy serwer RPG.

No to zaczynamy ! Wchodzimy do katalogu data/actions/scripts/ tworzymy plik stamina-refuel.lua i wklejamy do niego:

stamina-refuel.lua
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local cfg = {}
	cfg.refuel = 42 * 60 * 1000
	if(getPlayerStamina(cid) >= cfg.refuel) then
		doPlayerSendCancel(cid, "Your stamina is already full.")
	elseif(not isPremium(cid)) then
		doPlayerSendCancel(cid, "You must have a premium account.")
	else
		doPlayerSetStamina(cid, cfg.refuel)
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Your stamina has been refilled.")
		doRemoveItem(item.uid)
	end
	return true
end

data/actions/actions.xml dodajemy linjke:

 
<action itemid="TUTAJ ID ITEMA" script="stamina-refuel.lua"/>

TUTAJ ID ITEMA- tutaj musimy wybrac id itema pod jakim bedzie urzywany skrypt.

Gotowe!

otspub/stamina_doll_dobre_do_sms_shopu_by_backy.txt · Last modified: 2010/04/28 15:45 by kielb
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki
 otosowy pasek