Long ago, I've been working on a war server that uses no magic system.
Unfortunately, I lost interest in it and do not have a lot of time to continue work on it as I am working on other things.
So, I've decided to release some scripts that would be used in a war server.
I will release more different scripts when I get the time to make them.
TESTED ON 0.4,
TESTED ON 0.3, thanks amiroslo!
If someone can please test it on 0.2, I will put your name here!
Trapping net
You can use this trap (ID: 13173) to throw it on the ground in front of an enemy,
if he/she walks on it, they will not be allowed to move for X period of time.
You can click it to destroy it.
In data/actions/actions.xml:
In data/actions/scripts/trappingnet.lua:
In data/movements/movements.xml:
In data/movements/scripts/trappingnet.lua:
Land mine
When you place the land mine (ID: 5888) on the ground and if you use it, it will turn into cracks as if it looked like it was buried,
then when someone steps on it, the bomb will blow up and do damage to the person that steps on it.
In data/actions/actions.xml:
In data/actions/scripts/landmine.lua:
In data/movements/movements.xml:
In data/movements/scripts/landmine.lua:
Drunk Dart
While you're attacking someone, use this bamboo stick to shoot a dart that will make the target drunk and difficult to move in a straight path.
In data/actions/actions.xml:
In data/actions/scripts/drunkdart.lua:
Unfortunately, I lost interest in it and do not have a lot of time to continue work on it as I am working on other things.
So, I've decided to release some scripts that would be used in a war server.
I will release more different scripts when I get the time to make them.
TESTED ON 0.4,
TESTED ON 0.3, thanks amiroslo!
If someone can please test it on 0.2, I will put your name here!
Trapping net
You can use this trap (ID: 13173) to throw it on the ground in front of an enemy,
if he/she walks on it, they will not be allowed to move for X period of time.
You can click it to destroy it.
In data/actions/actions.xml:
Lua:
<action itemid="13173" event="script" value="trappingnet.lua"/>
In data/actions/scripts/trappingnet.lua:
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if isPlayer(cid) then
doSendMagicEffect(getThingPosition(item.uid), 2)
doCreatureSay(cid, "DESTROYED!", TALKTYPE_ORANGE_1)
doRemoveItem(item.uid)
end
return true
end
In data/movements/movements.xml:
Lua:
<movevent type="StepIn" itemid="13173" event="script" value="trappingnet.lua"/>
In data/movements/scripts/trappingnet.lua:
Lua:
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
doCreatureSetNoMove(cid, true)
doSendMagicEffect(getCreaturePosition(cid), 31)
doCreatureSay(cid, "TRAPPED!", TALKTYPE_ORANGE_1)
addEvent(doCreatureSetNoMove, 1000*3, cid, false)
doRemoveItem(item.uid)
return true
end
Land mine
When you place the land mine (ID: 5888) on the ground and if you use it, it will turn into cracks as if it looked like it was buried,
then when someone steps on it, the bomb will blow up and do damage to the person that steps on it.
In data/actions/actions.xml:
Lua:
<action itemid="5888" event="script" value="landmine.lua"/>
In data/actions/scripts/landmine.lua:
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getTilePzInfo(fromPosition) == FALSE then
doTransformItem(itemEx.uid, 6299)
doDecayItem(itemEx.uid)
else
doPlayerSendCancel(cid, 'You cannot use this in PZ.')
return true
end
end
In data/movements/movements.xml:
Lua:
<movevent type="StepIn" itemid="6299" event="script" value="landmine.lua"/>
In data/movements/scripts/landmine.lua:
Lua:
function onStepIn(cid, item, pos)
if(item.itemid == 6299) then
if(isPlayer(cid)) then
doTargetCombatHealth(0, cid, COMBAT_PHYSICALDAMAGE, -100, -200, CONST_ME_FIREAREA)
doRemoveItem(item.uid)
end
end
return true
end
Drunk Dart
While you're attacking someone, use this bamboo stick to shoot a dart that will make the target drunk and difficult to move in a straight path.
In data/actions/actions.xml:
Lua:
<action itemid="12401" event="script" value="drunkdart.lua"/>
In data/actions/scripts/drunkdart.lua:
Lua:
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, 5000)
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_CRAPS)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON)
local condition = createConditionObject(CONDITION_DRUNK)
setConditionParam(condition, CONDITION_PARAM_TICKS, 10000)
setCombatCondition(combat, condition)
function onUse(cid, item, fromPosition, itemEx, toPosition)
if not hasCondition(cid, CONDITION_EXHAUST) then
local target = getCreatureTarget(cid)
if target ~= 0 then
doAddCondition(cid, exhaust)
doCombat(cid, combat, numberToVariant(target))
doRemoveItem(item.uid, 1)
else
doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUCANONLYUSEITONCREATURES)
end
else
doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)
end
return true
end
Last edited: