• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

CreatureEvent Better way to train with Target Dummies

LucasFerraz

Systems Analyst
Joined
Jun 10, 2010
Messages
2,858
Reaction score
96
Location
Brazil
tstargetdummys2.jpg
Do you know that way to train in Target Dummies? This is the best way because it saves space.
Thus 8 players can train simultaneously in every monster. You will not need 5 floors to allocate 280 players at once because You just need 35 Target Dummies to do that.



How it works
Code:
If [I]player who got pushed¹[/I] is attacking Target Dummy then the [I]player who is pushing²[/I] will receive a cancel.
Text: Sorry, not possible.

Target Dummy
It casts a physical spell which makes all around getting shield rating, but it's not all. It's like 2 monster attacking each player. Like usual.
XML:
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Target Dummy" nameDescription="a target dummy" race="energy" experience="0" speed="0" manacost="0">
	<health now="100000" max="100000"/>
	<look type="304" corpse="9801"/>
	<targetchange interval="1000" chance="0"/>
	<strategy attack="100" defense="0"/>
	<flags>
		<flag summonable="0"/>
		<flag attackable="1"/>
		<flag hostile="1"/>
		<flag illusionable="0"/>
		<flag convinceable="0"/>
		<flag pushable="0"/>
		<flag canpushitems="1"/>
		<flag canpushcreatures="1"/>
		<flag targetdistance="0"/>
		<flag staticattack="90"/>
		<flag runonhealth="0"/>
	</flags>
	<attacks>
		<attack name="physical" interval="1000" chance="100" radius="3" min="-1" max="-2">
		</attack>
		<attack name="physical" interval="1200" chance="100" radius="3" min="-1" max="-2">
		</attack>
	</attacks>
	<defenses armor="1" defense="1">
		<defense name="healing" interval="10000" chance="100" min="100000" max="100000">
			<attribute key="areaEffect" value="blueshimmer"/>
		</defense>
	</defenses>
	<voices interval="12500" chance="25">
		<voice sentence="I hope you are enjoying your sparring Sir or Ma'am!"/>
		<voice sentence="Threat level rising!"/>
		<voice sentence="Engaging in hostile interaction!"/>
		<voice sentence="Rrrtttarrrttarrrtta"/>
		<voice sentence="Please feel free to hit me Sir or Ma'am!"/>
		<voice sentence="klonk klonk klonk"/>
		<voice sentence="Self-diagnosis running."/>
		<voice sentence="Battle simulation proceeding."/>
		<voice sentence="Repairs initiated!"/>
	</voices>
</monster>


made by Santy.
creaturescripts.xml:
XML:
	<event type="push" name="AntiPush" event="script" value="antipush.lua"/>
antipush.lua:
Lua:
local targetlist, ret = {"Target Dummy"}, true
 
function onPush(cid, target, ground, position)
	inArray = function (name) return isInArray(targetlist, name:lower()) end
	if((isPlayer(target) and inArray(getCreatureName(getCreatureTarget(target)))) or inArray(getCreatureName(target))) then
		ret = RETURNVALUE_NOTPOSSIBLE
	end
 
	return ret
end
 

Attachments

Last edited:
This is not working. :p People are still able to push eachother.
 
Working with version?


Edit: If you put water vortex's (teleports also?) at the tiles the players are standing on they can't get pushed, just a temporary solution.

Haven't tested the script yet, but remember to add at login.lua.
 
Lua:
local targetlist, ret = {"Target Dummy"}, true
 
function onPush(cid, target, ground, position)
	inArray = function (name) return isInArray(targetlist, name:lower()) end
	if((isPlayer(target) and inArray(getCreatureName(getCreatureTarget(target)))) or inArray(getCreatureName(target))) then
		ret = RETURNVALUE_NOTPOSSIBLE
	end
 
	return ret
end

fixed code because I'm drunk and why the fuck not
 
Last edited:
My target dummy is better, sorry

Like 2 regular monsters
XML:
	<attacks>
		<attack name="physical" interval="1000" chance="100" radius="3" min="-1" max="-2">
		</attack>
		<attack name="physical" interval="1200" chance="100" radius="3" min="-1" max="-2">
		</attack>
	</attacks>
 
I need this script for player no can push!
*
local targetlist, ret = {"Target Dummy"}, true

function onPush(cid, target, ground, position)
inArray = function (name) return isInArray(targetlist, name:lower()) end
if((isPlayer(target) and inArray(getCreatureName(getCreatureTarget(target)))) or inArray(getCreatureName(target))) then
ret = RETURNVALUE_NOTPOSSIBLE
end

return ret
end

Don`t work for my :S
 
Up: Other player push my.. no monster.. push my and I no atack :S
 
Back
Top