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

The Forgotten Server v0.2 (Mystic Spirit)

Status
Not open for further replies.
lol i have again problem with triggers saving skills ... skills of new characters dont save and when i want to add
Code:
Błąd

zapytanie SQL:

CREATE TRIGGER `oncreate_players` AFTER INSERT ON `players`
FOR EACH
ROW
BEGIN
INSERT INTO `player_skills` ( `player_id` , `skillid` , `value` )
VALUES (
NEW.`id` , 0, 10
);

INSERT INTO `player_skills` ( `player_id` , `skillid` , `value` )
VALUES (
NEW.`id` , 1, 10
);

INSERT INTO `player_skills` ( `player_id` , `skillid` , `value` )
VALUES (
NEW.`id` , 2, 10
);

INSERT INTO `player_skills` ( `player_id` , `skillid` , `value` )
VALUES (
NEW.`id` , 3, 10
);

INSERT INTO `player_skills` ( `player_id` , `skillid` , `value` )
VALUES (
NEW.`id` , 4, 10
);

INSERT INTO `player_skills` ( `player_id` , `skillid` , `value` )
VALUES (
NEW.`id` , 5, 10
);

INSERT INTO `player_skills` ( `player_id` , `skillid` , `value` )
VALUES (
NEW.`id` , 6, 10
);

END

MySQL zwrócił komunikat: Dokumentacja
#1235 - This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'
 
Code:
This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'

Update your phpmyadmin.
 
I doubt lootrate will make corpse disappear faster, looks more like a bug in the monster. Can you tell me which monster this happend with?

All monsters i supposed. But im 100% that it happends on trolls. sry for the really slow respond xD.

Edit:

Yes your right. Only trolls who do that. The bug was in the item, the corpse had the decay time at 10 while all other had on 600. So now fixed. Thx for your help, i woulden't have thought about that if you whoulden't told me :p
 
All monsters i supposed. But im 100% that it happends on trolls. sry for the really slow respond xD.

Edit:

Yes your right. Only trolls who do that. The bug was in the item, the corpse had the decay time at 10 while all other had on 600. So now fixed. Thx for your help, i woulden't have thought about that if you whoulden't told me :p

lol wtf are u talking about.... .this bug was fixed with 10paths ago or smth.....

are u using PATH 1? xD
 
I'm always getting house errors...
I dont know whats up.

They seem to work fine xD
 
replace npc forder from you previous server, I think it will work with previous NPC system
 
yes its true i too have that but fare you maybe know how use npc sweaty cyclops healers guards and addons npcs?
 
Post the script and xml file for the NPC this happens with.
XML:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Fernando" script="data/npc/scripts/Fernando.lua" walkinterval="2000" floorchange="0" access="5" level="1" maglevel="1">
	<health now="150" max="150"/>
	<look type="128" head="114" body="25" legs="78" feet="111" addons="1" corpse="2212"/>
	<parameters>
		<parameter key="module_shop" value="1" />
		<parameter key="message_greet" value="Hello! Welcome to my shop, I buy and sell all sort of things, just look at the blackboards." />
		<parameter key="module_keywords" value="1" />
		<parameter key="keywords" value="offers;job;basement;diary;lily;perr" />
		<parameter key="keyword_reply1" value="Look at the blackboards." />
		<parameter key="keyword_reply2" value="I buy and sell all sort of things, just check the blackboards or ask me." />
		<parameter key="keyword_reply3" value="Errhm...Thats my... Storage. Yeah, thats where i store... Errhm... Things..." />
		<parameter key="keyword_reply4" value="My d-- -Clears throat- Errhm... Those are for lil' girl. Haha!" />
		<parameter key="keyword_reply5" value="She's hot..." />
		<parameter key="keyword_reply6" value="Ha! And they call ME gay..." />
		<parameter key="shop_buyable" value="spear,2389,10;rapier,2384,15;sabre,2385,25;dagger,2379,5;hand axe,2380,8;axe,2386,20;short sword,2486,30;wooden shield,2512,15;studded shield,2526,50;coat,2651,8;jacket,2650,10;doublet,2485,16;leather armor,2467,25;leather legs,2649,10;leather helmet,2461,12;studded helmet,2482,62;chain helmet,2458,52;torch,2050,2;bag,1987,4;scroll,1949,5;shovel,2554,10;backpack,1988,10;sickle,2405,8;scythe,2550,12;rope,2120,50;fishing rod,2580,150;worm,3976,1" />
		<parameter key="shop_sellable" value="katana,2412,35;mace,2398,30;sword,2376,25;hatchet,2388,25;sabre,2385,12;short sword,2406,10;axe,2386,7;rapier,2384,5;bone club,2449,5;hand axe,2380,4;spear,2389,3;studded club,2448,2;dagger,2379,2;copper shield,2530,50;plate shield,2510,40;brass shield,2511,25;studded shield,2526,16;wooden shield,2512,3;brass armor,2465,150;chain armor,2464,40;studded legs,2468,15;studded armor,2484,10;leather armor,2467,5;doublet,2485,3;leather legs,2649,2;viking helmet,2473,25;legion helmet,2480,22;studded helmet,2482,20;chain helmet,2458,12;leather helmet,2461,3;leather boots,2643,2;fishing rod,2580,30;rope,2120,8;scythe,2550,3;shovel,2554,2;sickle,2405,2;machete,2420,6" />
	</parameters>
</npc>
Lua:
PHP:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

function onCreatureAppear(cid)			npcHandler:onCreatureAppear(cid)			end
function onCreatureDisappear(cid)		npcHandler:onCreatureDisappear(cid)			end
function onCreatureSay(cid, type, msg)	npcHandler:onCreatureSay(cid, type, msg)	end
function onThink()						npcHandler:onThink()						end

function creatureSayCallback(cid, type, msg)
	-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
	if(not npcHandler:isFocused(cid)) then
		return false
	end
	local status = getPlayerStorageValue(cid,1000)
	if msgcontains(msg, 'addon') or msgcontains(msg, 'outfit') then
		if status == -1 then
			selfSayChannel(cid,'Do you like my backpack? I don\'t sell it, sorry. It\'s handmade from minotaur leather.')
			talk_state = 1
		elseif status == 1 then
			selfSayChannel(cid,'Did you bring me 100 pieces of minotaur leathers?')
			talk_state = 3
		else
			selfSayChannel(cid,'I already made a backpack for you.')			
		end
	elseif msgcontains(msg, 'minotaur leather') and talk_state == 1 then
		selfSayChannel(cid,'If you get me the minotaur leather, I can make one for you, but it\'s not easy to get minotaur leather. Do you want me to make one for you?')
		talk_state = 2
	elseif msgcontains(msg, 'pick') then
		selfSayChannel(cid,'Picks are not easy to get. So I only trade them for small axes. Do you want to trade?')
		talk_state = 4
------------------------------------------------ yes ------------------------------------------------
	elseif msgcontains(msg, 'yes') then
		if talk_state == 2 then
			selfSayChannel(cid,'Ok, then bring me 100 pieces minotaur leathers and I will do the backpack for you. Good luck!')
			setPlayerStorageValue(cid,1000,1)
		elseif talk_state == 3 then
			if getPlayerItemCount(cid,5878) >= 100 then
				selfSayChannel(cid,'Alright, Here is your new backpack, enjoy it!')
				doPlayerAddOutfit(cid, 128, 1)
				doPlayerAddOutfit(cid, 136, 1)
				setPlayerStorageValue(cid,1000,2)
				doPlayerTakeItem(cid,5878,100)
			else
				selfSayChannel(cid,'Hey! You only have '..getPlayerItemCount(cid,5878)..' minotaur leathers! Come back when you have 100!')
			end
		elseif talk_state == 4 then
			if getPlayerItemCount(cid,2559) >= 1 then
				selfSayChannel(cid,'Good! Take your pickaxe.')
				doPlayerAddItem(cid,2553,1)
			else
				selfSayChannel(cid,'Hey! You do not have a small axe!')
			end
		end
		talk_state = 0
------------------------------------------------ no ------------------------------------------------
	elseif msgcontains(msg, 'no') and talk_state >= 1 and talk_state <= 4 then
		selfSayChannel(cid,'Not good enough, is it?.')
		talk_state = 0
	end
	return true
end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
 
Everything works, except it crashes when you say trade, and it was working on earlier patches.
 
Maybe because Mystic Spirit changed to 8.31? :p

Trying to connect with older versions = Debug :eek:

Try with a Tibia Client 8.3X
 
when i load my server it just closes no idea why it loads map says it willl take 50 seconds to load map and it just closes no exception errors or anything.... not cool :(

There has to be a new system that wil lsay errors in the database because that was my problem and i dont wanna do anothe reset for like 5th time... -.-
 
Last edited by a moderator:
Status
Not open for further replies.
Back
Top