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

[8.4] Files hurts Player.

koliber66

New Member
Joined
Oct 28, 2008
Messages
196
Reaction score
0
Location
Black(Recife)
Hello i need this script can anyone help ?
When player walks at a tile with uniqueID ,
an arrow flies from x y z and hurts the player (Removing like ~400HP).

THX anyway =)

koli~~
 
Code:
local config = {  
  playerpos = getCreaturePosition(cid)
  shotfrom = {x = your pos.x, y = xxx, z = xxx}
  damage = ((getPlayerLevel(cid) * 5) + math.random(-20,20)/3)
}

if item.actionid == xxx then
 doSendDistanceShoot(config.shotfrom, config.playerpos, 6)
 doSendMagicEffect(playerpos,CONST_ME_DRAWBLOOD)
 doPlayerAddHealth(cid,config.damage)
end

This is very simple script but i don't if there are any bugs. Try it please :)
And don forget to add it to movements.xml
<movevent event="StepIn" actionid="xxx" script="xxx.lua"/>
 
[10/01/2009 14:34:18] Warning: [Event::loadScript] Can not load script. data/movements/scripts/hurts.lua
[10/01/2009 14:34:18] data/movements/scripts/hurts.lua:3: '}' expected (to close '{' at line 1) near 'shotfrom'

I have these Error =(
 
he forgot to sperate the things in the table with commas.

Code:
local config = {  
  playerpos = getCreaturePosition(cid),
  shotfrom = {x = your pos.x, y = xxx, z = xxx},
  damage = ((getPlayerLevel(cid) * 5) + math.random(-20,20)/3)
}

if item.actionid == xxx then
 doSendDistanceShoot(config.shotfrom, config.playerpos, 6)
 doSendMagicEffect(playerpos,CONST_ME_DRAWBLOOD)
 doPlayerAddHealth(cid,config.damage)
end

kind regards, Evil Hero
 
Back
Top Bottom