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

Pls help me with a simple script! Rep+++

pokestart

New Member
Joined
Nov 18, 2010
Messages
23
Reaction score
1
You cant enter the protection zone when you have a creature summoned, you have to call it back to enter the protection zone!

Text is comming out: Please call back your creature to enter the here.

If he dont call back he get push 1 sqm back!

Please help me rep+++ for helping me!
 
Last edited:
hmm i dont know, but i sure its will contain this thins:

if getTilePzInfo(getCreaturePosition(cid)) then
return doPlayerSendCancel(cid, "You cant enter protection zone if you dont call back your summon.")
end
 
Lua:
function onStepIn(cid,frompos,topos)
	if getTilePzInfo(topos) then
		if getCreatureSummons(cid) > 0 then
			doPlayerSendCancel(cid,'Call back your summon first.')
			doTeleportThing(cid,frompos)
		end
	end
	return true
end
 
Lua:
function onStepIn(cid,frompos,topos)
	if getTilePzInfo(topos) then
		if getCreatureSummons(cid) > 0 then
			doPlayerSendCancel(cid,'Call back your summon first.')
			doTeleportThing(cid,frompos)
		end
	end
	return true
end

This script's good. If u want to edit source then look for:
Code:
ReturnValue Tile::__queryAdd(int32_t, const Thing* thing, uint32_t,
	uint32_t flags) const
function in tile.cpp
 
This script's good. If u want to edit source then look for:
Code:
ReturnValue Tile::__queryAdd(int32_t, const Thing* thing, uint32_t,
	uint32_t flags) const
function in tile.cpp

Thanks :) works for me 100% so it can't be on my LUA scripting.

Btw. got any good tutorials to learn C++?
 
Ye it can be done by lua. But you need to put on every tile with pz (or there where you wish to) a action id. Or tie one item id with script and use this item on pz entrance.

What about c++:
Amazon.co.uk: c++: Books

I can use it (0.3.6pl1) with only an actionid which I set to several tiles only, so it's not really annoying.

And have any good free online C++ tutorials? I can't take a credit card without permission without being 18 years old in Holland <_< sucks.
P.s. specificaly for OTs if possible, it gives me motivation to keep on learning on as I did with LUA.
 
Back
Top