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

[REQUEST] Training monk summon script.

Awesome Slayer

New Member
Joined
Jul 16, 2008
Messages
58
Reaction score
0
i need a script that when u stand on a tile it summons 4 monks 1 on each diagonal square. soo...

im using TFS 2.11.693
_____________________
Monk SQM Monk
SQM Player SQM
Monk SQM Monk
_____________________
 
Last edited:
I can help you, if you click on a lever, or something else, for an example a clock on the wall, monsters will be summoned around you...

But don't got any onstepin examples :p
 
YES PLEASE

but it needs to be 4 monks and only summon aound the person who flik it and would i be able to use the script multiple times or would i need multiple switchs withthe same script?
 
data/actions
actions.xml
Code:
	<action uniqueid="[COLOR="Orange"]7880[/COLOR]" script="monsterattack.lua" />

data/actions/scripts
monsterattack.lua

Code:
function onUse(cid, item, frompos, item2, topos)

   	if item.uid == [COLOR="Orange"]7880[/COLOR] then
   		queststatus = getPlayerStorageValue(cid,[COLOR="Orange"]7880[/COLOR])
   		if queststatus == -1 then
  		backpos1 = {[COLOR="Green"]x=926, y=1002, z=9[/COLOR]}
  		backpos2 = {[COLOR="Green"]x=927, y=1002, z=9[/COLOR]}
  		backpos3 = {[COLOR="Green"]x=928, y=1002, z=9[/COLOR]}
  		backpos4 = {[COLOR="Green"]x=925, y=1004, z=9[/COLOR]}
			doSummonCreature("Monk", backpos1)
			doSummonCreature("Monk", backpos2)
			doSummonCreature("Monk", backpos3)
			doSummonCreature("Monk", backpos4)
			doPlayerSendTextMessage(cid,22,"Attack!")
			setPlayerStorageValue(cid,[COLOR="Orange"]7880[/COLOR],1)
   		else
   			doPlayerSendTextMessage(cid,22,"They don't feel for attacking you any more.")
   		end
	else
		return 0
   	end

   	return 1
end

Green = you have to change to the positions at your map
orange = you need to put an unique id you arent using.

There is an quest status added there, so you can only click on the lever once, so they cant spam it to level fast up by killing monsters fast.
 
Code:
function onUse(cid, item, frompos, item2, topos)

   	if item.uid == [COLOR="Orange"]7880[/COLOR] then
   		queststatus = getPlayerStorageValue(cid,[COLOR="Orange"]7880[/COLOR])
   		if queststatus == -1 then
  		backpos1 = {[COLOR="Green"]x=926, y=1002, z=9[/COLOR]}
  		backpos2 = {[COLOR="Green"]x=927, y=1002, z=9[/COLOR]}
  		backpos3 = {[COLOR="Green"]x=928, y=1002, z=9[/COLOR]}
  		backpos4 = {[COLOR="Green"]x=925, y=1004, z=9[/COLOR]}
			doSummonCreature("Monk", backpos1)
			doSummonCreature("Monk", backpos2)
			doSummonCreature("Monk", backpos3)
			doSummonCreature("Monk", backpos4)
			doPlayerSendTextMessage(cid,22,"Attack!")
			setPlayerStorageValue(cid,[COLOR="Orange"]7880[/COLOR],0)
   		else
   			doPlayerSendTextMessage(cid,22,"They don't feel for attacking you any more.")
   		end
	else
		return 0
   	end

   	return 1
end

My logic says this will work, when you clicked and got the monks summoned, you got storagevalue +1, but with +0 it shoudn't be any diffrences, and you would be able to do it again.
 
kk try this:
Code:
function onUse(cid, item, frompos, item2, topos)

   	if item.uid == [COLOR="Orange"]7880[/COLOR] then
  		backpos1 = {[COLOR="Green"]x=926, y=1002, z=9[/COLOR]}
  		backpos2 = {[COLOR="Green"]x=927, y=1002, z=9[/COLOR]}
  		backpos3 = {[COLOR="Green"]x=928, y=1002, z=9[/COLOR]}
  		backpos4 = {[COLOR="Green"]x=925, y=1004, z=9[/COLOR]}
			doSummonCreature("Monk", backpos1)
			doSummonCreature("Monk", backpos2)
			doSummonCreature("Monk", backpos3)
			doSummonCreature("Monk", backpos4)
			doPlayerSendTextMessage(cid,22,"Attack!")
   		else
   			doPlayerSendTextMessage(cid,22,"You will never get this message unless the script is bugged.")
   		end
	else
		return 0
   	end

   	return 1
end

Im still a newbeginner at this, I am modifyed scripts I have allready recieved and seen on theese forums.

I believe this script works fine, but the other script shoud work aswell, but it didnt work since you tested it without i added +0, so you had allready recieved that you did the queststatus, and therefore it probaly didnt work.
 
Last edited:
You can try to change
Code:
function onUse(cid, item, frompos, item2, topos)
with
Code:
function onStepIn(cid, item, frompos, item2, topos)

But im not sure if this script fit for an stepin for movements
 
Add:
data/movements/scripts: monk.lua
function onStepIn(cid, item, position, fromPosition)

pos1 = {x=xxxx, y=yyyy, z=zzzz}
pos2 = {x=xxxx, y=yyyy, z=zzzz}
pos3 = {x=xxxx, y=yyyy, z=zzzz}
pos4 = {x=xxxx, y=yyyy, z=zzzz}}
doSummonCreature("Monk", pos1)
doSummonCreature("Monk", pos2)
doSummonCreature("Monk", pos3)
doSummonCreature("Monk", pos4)

end

Add:
data/movements: movements.xml
<movevent event="StepIn" actionid="0000" script="monk.lua"/>

If you want to have a unique tile then just change the green to "uniqueid"...

Though its just a simple script so it will make errors in your console if you step on the tile if monks already are summoned.

Edit: The action/unique id (green text), thats the tile you're supposed to walk on to summon the monks!
 
Last edited:
first of all thank you to Znote, second thankyou Emotive Beaver i decided to go witht the switch option but i was wondering when u use a onstepin script is there a way that when u stap off it (or onto a different square) it desummons the monks.

Thanks, Awesome Slayer
 
hmm, never seen any scripts where you remove a monster, but you could this idea:

An nice idea, if you got space on your map editor, make an onstepin, when you stepin, you get teleported to a room, but the room looks 100% the same, but its training monks there, that way the player will not notice any changings, else than the monks suddenly appears, and when going back, you will have to walk on another square which teleports you back to the place without monks.

Then you can use this simple script:
Code:
function onStepIn(cid, item, position, fromPosition)

local pos = {x = 793, y = 1014, z = 7}

	if isPlayer(cid) == 1 then
		doTeleportThing(cid, pos)
	end
end

Just change the positions to fit your map.
 
Last edited:
Back
Top