• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

[popraw skrypt]Odnawianie Staminy na 0.3.4

Status
Not open for further replies.

klekSu

Stroke my ego.
Joined
Nov 4, 2008
Messages
1,285
Reaction score
18
Cześć, fixnie ktoś? Z db.executeQuery też nie poszło.

Code:
local stamina = { add = 42 * 60, full = 41 * 60 }
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if(getPlayerStamina(cid) > stamina.full) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Your stamina is currently too full to use this.")
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
	else
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Your stamina has been successfully refilled.")
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_GIFT_WRAPS)
		doPlayerSetStamina(cid, stamina.add)
		doRemoveItem(item.uid)
		return true
	end
end

Dzięki.
 
Tak robiłem :p nie wiem czy na 0.3.4 w ogóle była funkcja doPlayerSetStamina
 
No właśnie o to chodzi, dobra :p przepisze skrypt z luascripts.cpp myslałem, że da rade jakoś bez tego bo szczerze mówiąc po prostu mi się nie chciało czekać do kolejnego restartu silnika :D ok nie ważne.
 
Status
Not open for further replies.
Back
Top