• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Skrypt onkill

A nie bo ma. Wyjątkowo ma. Nie ma prawie wszyskich innych komend ale to ma. A ty za to nie masz fukcji onlook.

#Edit2
Czy ja napisałem że on jest proserwer? Jest poprostu dobry wysłużony serwer, tak jakbyś porównywał Yourez OTS wraz z tfsem. Zresztą nie ma silnika na 8.2 prócz tej wersji co wydał szacowny gęsior po edycji bodajże tfs 0.2

TO NIE JEST KURWA ZADNA KOMENDA

skad takie stwierdzenie, ze nie mam onLook skoro mam kilka skryptów bazujących na tej funkcji?
tfs 0.3.6 & 0.4:
onLook(cid, thing, position, lookDistance)

starsze pewnie też mają ziam xD
 
ziam. Załamałem się. Myślałem że jestem pro z fukcją onlook.
Nie zmienia to faktu że na 8.2 nie istnieje żadna mocno stabilna wersja tfsa.
 
Złozylem taki skrypt ale nie usuwa po 3 minutach tp:
LUA:
local config = {
message = "Go into the teleporter in 3 minutes, else it will disappear.",
	timeToRemove = 180, 
	teleportId = 1387,
	monster = {x=1520, y=2689, z=3}
}

local function removal(position)
	if getThingfromPos(position).itemid == config.teleportId then
		doRemoveItem(getThingfromPos(position).uid)
	end
	end



function onKill(cid, target)

if (getCreatureName(target) == "OTS Boss") then
doSummonCreature("OTS Quen", config.monster)
elseif (getCreatureName(target) == "OTS Quen") then
doSummonCreature("OTS King", config.monster)
elseif (getCreatureName(target) == "OTS King") then
	doSummonCreature("Snakus", config.monster)
elseif (getCreatureName(target) == "Snakus") then
	doCreateTeleport(1387, {x=1720, y=2740, z=3}, {x=1525, y=2690, z=3})
	doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
	addEvent(removal, config.timeToRemove * 1000, {x=1525, y=2690, z=3})
		end
	return TRUE
end
 
LUA:
	local teleport = doCreateTeleport(1387, {x=1720, y=2740, z=3}, {x=1525,.. })
	addEvent(doRemoveItem, config.timeToRemove * 1000, teleport.uid)

removal nie potrzebne? :o
 
A nie bo ma. Wyjątkowo ma. Nie ma prawie wszyskich innych komend ale to ma. A ty za to nie masz fukcji onlook.

#Edit2
Czy ja napisałem że on jest proserwer? Jest poprostu dobry wysłużony serwer, tak jakbyś porównywał Yourez OTS wraz z tfsem. Zresztą nie ma silnika na 8.2 prócz tej wersji co wydał szacowny gęsior po edycji bodajże tfs 0.2

O kurwa, on ma onLook, ja pierdu.

Code:
uint32_t CreatureEvent::executeOnLook(Player* player, const Position& position, uint8_t stackpos)
{
	//onLook(cid, position)
	if(m_scriptInterface->reserveScriptEnv())
	{
		ScriptEnviroment* env = m_scriptInterface->getScriptEnv();

		#ifdef __DEBUG_LUASCRIPTS__
		std::stringstream desc;
		desc << creature->getName();
		env->setEventDesc(desc);
		#endif

		env->setScriptId(m_scriptId, m_scriptInterface);
		env->setRealPos(player->getPosition());

		uint32_t cid = env->addThing(player);

		lua_State* L = m_scriptInterface->getLuaState();

		m_scriptInterface->pushFunction(m_scriptId);
		lua_pushnumber(L, cid);
		LuaScriptInterface::pushPosition(L, position, stackpos);

		int32_t result = m_scriptInterface->callFunction(2);
		m_scriptInterface->releaseScriptEnv();

		return (result != LUA_FALSE);
	}
	else
	{
		std::cout << "[Error] Call stack overflow. CreatureEvent::executeOnLook." << std::endl;
		return 0;
	}
}

Ja mam w 7.6, jestem super?
 
Back
Top