• 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!

spell 0.4 3777

Lbtg

Intermediate OT User
Joined
Nov 22, 2008
Messages
2,324
Reaction score
136
Hello can i request please a spell that burns 200 of your soul in exchange for 1 hour of stamina?
 
local cfg = {}
cfg.refuel = 1 * 60 * 1000
if getPlayerSoul(cid) == 200 then
doPlayerAddSoul(cid, -200)
doPlayerSetStamina(cid, cfg.refuel)
else
doPlayerSendCancel(cid, "You must have a soul point .")


ur script will be like this
 
Last edited:
local cfg = {}
cfg.refuel = 1 * 60 * 1000
if getPlayerSoul(cid) == 200 then
doPlayerAddSoul(cid, -200)
doPlayerSetStamina(cid, cfg.refuel)
else
doPlayerSendCancel(cid, "You must have a soul point .")


ur script will be like this
how i can implement this script ? thanks :)
 
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)

function onCastSpell(cid, var)
   local cfg = {
       refuel = 1 * 60 * 1000,
       amount_of_soul = 200
   }
   if getPlayerSoul(cid) == cfg.amount_of_soul then
       doPlayerAddSoul(cid, -cfg.amount_of_soul)
       doPlayerSetStamina(cid, cfg.refuel)
       doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
       return doCombat(cid, combat, var) and true
   end
   return doPlayerSendCancel(cid, "You must have ".. cfg.amount_of_soul .." soul points to refuel your stamina."), doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) and true
end
 
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)

function onCastSpell(cid, var)
   local cfg = {
       refuel = 1 * 60 * 1000,
       amount_of_soul = 200
   }
   if getPlayerSoul(cid) == cfg.amount_of_soul then
       doPlayerAddSoul(cid, -cfg.amount_of_soul)
       doPlayerSetStamina(cid, cfg.refuel)
       doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
       return doCombat(cid, combat, var) and true
   end
   return doPlayerSendCancel(cid, "You must have ".. cfg.amount_of_soul .." soul points to refuel your stamina."), doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) and true
end
Works perfect thanks @GarQet
 
Back
Top