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

Solved quest log wont show quests

ziggy46802

Active Member
Joined
Aug 19, 2012
Messages
418
Reaction score
27
Okay, here is my login.lua
Code:
local config = {
	loginMessage = getConfigValue('loginMessage'),
	useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}
		

function onLogin(cid)
		
		
	if getPlayerStorageValue(cid, 1000) < 1 then
	setPlayerStorageValue(cid, 1000, 1) and
	
--killing in the name of

setPlayerStorageValue(cid, 	14501, 0) and
setPlayerStorageValue(cid, 	14502, 0) and
setPlayerStorageValue(cid, 	14017, 0) and --energy elementals 
setPlayerStorageValue(cid, 	14019, 0) and --mutated rats
setPlayerStorageValue(cid, 	14016, 0) and --earth elementals
setPlayerStorageValue(cid, 	14009, 0) and --carniphilias
setPlayerStorageValue(cid, 	14013, 0) and --quara scouts
setPlayerStorageValue(cid, 	14006, 0) and --demons
setPlayerStorageValue(cid, 	14022, 0) and --behemoths
setPlayerStorageValue(cid, 	14020, 0) and --giant spider
setPlayerStorageValue(cid, 	14002, 0) and --serpent spawn
setPlayerStorageValue(cid, 	14015, 0) and--water elementals
setPlayerStorageValue(cid, 	14021, 0) and --hydras
setPlayerStorageValue(cid, 	14010, 0) and --stone golems
setPlayerStorageValue(cid, 	14014, 0) and --quaras
setPlayerStorageValue(cid, 	14001, 0) and --sea serpents
setPlayerStorageValue(cid, 	14004, 0) and --minotaurs
setPlayerStorageValue(cid, 	14007, 0) and --crocodiles
setPlayerStorageValue(cid, 	14018, 0) and --fire elementals
setPlayerStorageValue(cid, 	14012, 0) and --ice golems
setPlayerStorageValue(cid, 	14008, 0) and --tarantulas
setPlayerStorageValue(cid, 	14011, 0) and --mammoths
setPlayerStorageValue(cid, 	14003, 0) and --necros and priesteses	
		
--mining
	
setPlayerStorageValue(cid, 4001, 1) and

--pot and hydra plants

setPlayerStorageValue(cid, 3000, 1) and 
setPlayerStorageValue(cid, 3001, 1) and 
setPlayerStorageValue(cid, 3002, 1) and 
setPlayerStorageValue(cid, 3003, 1) and 
setPlayerStorageValue(cid, 3004, 1) and 
setPlayerStorageValue(cid, 3005, 1) and 
setPlayerStorageValue(cid, 3006, 1) and 
setPlayerStorageValue(cid, 3007, 1) and 
setPlayerStorageValue(cid, 3008, 1) and 
setPlayerStorageValue(cid, 3009, 1) and 
setPlayerStorageValue(cid, 3010, 1) and 
setPlayerStorageValue(cid, 3011, 1) and 
setPlayerStorageValue(cid, 3012, 1) and 
setPlayerStorageValue(cid, 3013, 1) and 
setPlayerStorageValue(cid, 3014, 1) and 
setPlayerStorageValue(cid, 3015, 1) and 
setPlayerStorageValue(cid, 3016, 1) and 
setPlayerStorageValue(cid, 3017, 1) and

--addons
 
setPlayerStorageValue(cid, 22001, 1) and -- first citizen addon
setPlayerStorageValue(cid, 2001, 1) and -- second citizen addon
setPlayerStorageValue(cid, 2003, 1) and -- second hunter addon
setPlayerStorageValue(cid, 22003, 1) and -- first hunter addon
setPlayerStorageValue(cid, 22017, 1) and -- first druid addon
setPlayerStorageValue(cid, 2017, 1) and -- second druid addon
setPlayerStorageValue(cid, 22009, 1) and -- first nobleman addon
setPlayerStorageValue(cid, 2009, 1) and -- second nobleman addon
setPlayerStorageValue(cid, 22011, 1) and -- first summoner addon
setPlayerStorageValue(cid, 2011, 1) and -- second summoner addon
setPlayerStorageValue(cid, 22005, 1) and -- first mage addon
setPlayerStorageValue(cid, 2005, 1) and -- second mage addon
setPlayerStorageValue(cid, 22007, 1) and -- first knight addon
setPlayerStorageValue(cid, 2007, 1) and -- second knight addon
setPlayerStorageValue(cid, 22015, 1) and -- first barbarian addon
setPlayerStorageValue(cid, 2015, 1) and -- second barbarian addon
setPlayerStorageValue(cid, 22013, 1) and -- first warrior addon
setPlayerStorageValue(cid, 2013, 1) and -- second warrior addon
setPlayerStorageValue(cid, 22019, 1) and -- first wizard addon
setPlayerStorageValue(cid, 2019, 1) and -- second wizard addon
setPlayerStorageValue(cid, 22021, 1) and -- first oriental addon
setPlayerStorageValue(cid, 2021, 1) and -- second oriental addon
setPlayerStorageValue(cid, 22045, 1) and -- first wayfarer addon
setPlayerStorageValue(cid, 2045, 1) and -- second wayfarer addon
setPlayerStorageValue(cid, 22023, 1) and -- first pirate addon
setPlayerStorageValue(cid, 2023, 1) and -- second pirate addon
setPlayerStorageValue(cid, 22025, 1) and -- first assassin addon
setPlayerStorageValue(cid, 2025, 1) and -- second assassin addon
setPlayerStorageValue(cid, 22027, 1) and -- first beggar addon
setPlayerStorageValue(cid, 2027, 1) and -- second beggar addon
setPlayerStorageValue(cid, 22029, 1) and -- first shaman addon
setPlayerStorageValue(cid, 2029, 1) and -- second shaman addon
setPlayerStorageValue(cid, 22031, 1) and -- first norseman addon
setPlayerStorageValue(cid, 2031, 1) and -- second norseman addon
setPlayerStorageValue(cid, 22033, 1) and -- first nightmare addon
setPlayerStorageValue(cid, 2033, 1) and -- second nightmare addon
setPlayerStorageValue(cid, 22035, 1) and -- first jester addon
setPlayerStorageValue(cid, 2035, 1) and -- second jester addon
setPlayerStorageValue(cid, 22037, 1) and -- first brotherhood addon
setPlayerStorageValue(cid, 2037, 1) and -- second brotherhood addon
setPlayerStorageValue(cid, 22039, 1) and -- first yalaharian addon
setPlayerStorageValue(cid, 2039, 1) and -- second yalaharian addon
setPlayerStorageValue(cid, 22041, 1) and -- first demonhunter addon
setPlayerStorageValue(cid, 2041, 1) and -- second demonhunter addon
setPlayerStorageValue(cid, 22043, 1) and -- first warmaster addon
setPlayerStorageValue(cid, 2043, 1) and -- second warmaster addon
	
	
	
	
	
	
	--start with all quests in quest log

setPlayerStorageValue(cid, 1000, 1) and

	--Main Quests
setPlayerStorageValue(cid, 1001, 1) and --Sewer Work
setPlayerStorageValue(cid, 1002, 1) and --Premium
setPlayerStorageValue(cid, 1003, 1) and --platinum coin in temple log
setPlayerStorageValue(cid, 1004, 1) and -- broken sign
setPlayerStorageValue(cid, 1005, 1) and -- chain
setPlayerStorageValue(cid, 1006, 1) and -- minotaur book
setPlayerStorageValue(cid, 1007, 1) and --rotworm cave
setPlayerStorageValue(cid, 1008, 1) and -- wasp quest
setPlayerStorageValue(cid, 1009, 1) and -- bp quest
setPlayerStorageValue(cid, 1011, 1) and -- bp quest
setPlayerStorageValue(cid, 1010, 1) and -- bp quest
setPlayerStorageValue(cid, 1013, 1) and -- bp quest (bp of holding)
setPlayerStorageValue(cid, 1014, 1) and -- bp quest (bp of holding)
setPlayerStorageValue(cid, 1012, 1) and -- softboots (old widow) quest
setPlayerStorageValue(cid, 1015, 1) and -- troll fucker (10k quest) quest
setPlayerStorageValue(cid, 1016, 1) and -- boots of haste (graveyard, necros) quest
setPlayerStorageValue(cid, 1017, 1) and -- silkweaver bow (goblin) quest
setPlayerStorageValue(cid, 1019, 1) and -- blue robe (warlocks) quest
setPlayerStorageValue(cid, 1020, 1) and -- damaged helmet (part of HOTA)
setPlayerStorageValue(cid, 1021, 1) and -- crusader helmet quest (orc warlord)
setPlayerStorageValue(cid, 1022, 1) and -- elvish bow quest
setPlayerStorageValue(cid, 1023, 1) and -- hookah, healing pots quest
setPlayerStorageValue(cid, 1024, 1) and -- pot quest
setPlayerStorageValue(cid, 1025, 1) and -- pot2 respawn
setPlayerStorageValue(cid, 1026, 1) and -- pot respawn
setPlayerStorageValue(cid, 1027, 1) and -- bp quest
setPlayerStorageValue(cid, 1029, 1) and -- piece 2 of hota
setPlayerStorageValue(cid, 1030, 1) and -- piece 2 of hota
setPlayerStorageValue(cid, 1031, 1) and -- black knight (legs and armor) quest
setPlayerStorageValue(cid, 1032, 1) and -- hydra egg quest (royal helmet)
setPlayerStorageValue(cid, 1033, 1) and -- thieves gear quest
setPlayerStorageValue(cid, 1034, 1) and -- thieves gear quest axe
setPlayerStorageValue(cid, 1035, 1) and -- thieves gear quest club
setPlayerStorageValue(cid, 1036, 1) and -- thieves gear quest sword
setPlayerStorageValue(cid, 1037, 1) and -- thieves gear quest boots
setPlayerStorageValue(cid, 1038, 1) and -- thieves gear quest legs
setPlayerStorageValue(cid, 1039, 1) and -- thieves spears quest
setPlayerStorageValue(cid, 1040, 1) and -- thieves first spears
setPlayerStorageValue(cid, 1041, 1) and -- thieves second spears
setPlayerStorageValue(cid, 1042, 1) and -- thieves plat quest
setPlayerStorageValue(cid, 1043, 1) and -- thieves first plats
setPlayerStorageValue(cid, 1044, 1) and -- thieves second plats
setPlayerStorageValue(cid, 1045, 1) and -- snowball assassin addon quest
setPlayerStorageValue(cid, 1046, 1) and -- thieves elvenhair rope quest
setPlayerStorageValue(cid, 1047, 1) and -- thieves potion quest
setPlayerStorageValue(cid, 1048, 1) and -- thieves first potions
setPlayerStorageValue(cid, 1049, 1) and -- thieves second potions
setPlayerStorageValue(cid, 1050, 1) and -- thieves brown mushroom quest
setPlayerStorageValue(cid, 1051, 1) and -- helmet adornment
setPlayerStorageValue(cid, 1052, 1) and -- demodras, firewalker boots
setPlayerStorageValue(cid, 1053, 1) and -- pharoah quest
setPlayerStorageValue(cid, 1054, 1) and -- teleport for pharoah quest
setPlayerStorageValue(cid, 1055, 1) and -- cyclops/golden armor quest
setPlayerStorageValue(cid, 1056, 1) and -- nose ring/light shovel quest
setPlayerStorageValue(cid, 1057, 1) and -- plat ammy/parchment quest
setPlayerStorageValue(cid, 1058, 1) and -- pharaoh/golden legs quest
setPlayerStorageValue(cid, 1059, 1) and -- helmet ornament
setPlayerStorageValue(cid, 1060, 1) and -- potions quest
setPlayerStorageValue(cid, 1061, 1) and -- patched boots quest
setPlayerStorageValue(cid, 1062, 1) -- soft golem quest
		
	return true
end
	
	local loss = getConfigValue('deathLostPercent')
	if(loss ~= nil) then
		doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
	end

	local accountManager = getPlayerAccountManager(cid)
	if(accountManager == MANAGER_NONE) then
		local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage
		if(lastLogin > 0) then
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
			str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "."
		else
			str = str .. " Please choose your outfit."
			doPlayerSendOutfitWindow(cid)
		end

		doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
	elseif(accountManager == MANAGER_NAMELOCK) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?")
	elseif(accountManager == MANAGER_ACCOUNT) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.")
	else
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.")
	end

	if(not isPlayerGhost(cid)) then
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
	end

	registerCreatureEvent(cid, "Mail")
	registerCreatureEvent(cid, "GuildMotd")
registerCreatureEvent(cid,'SpellUp')
registerCreatureEvent(cid, "partyAndGuildProtection")


	registerCreatureEvent(cid, "Idle")
	if(config.useFragHandler) then
		registerCreatureEvent(cid, "SkullCheck")
	end

	registerCreatureEvent(cid, "ReportBug")
	registerCreatureEvent(cid, "AdvanceSave")
	return true
end

Here is the first few lines of my quests.xml

Code:
<?xml version="1.0" encoding="UTF-8"?>
<quests>
<quest name="Granitewood" startstorageid="1000" startstoragevalue="1">
<mission name="First Quest" storageid="1001" startvalue="1" endvalue="2">
	<missionstate id="1" description="Just the first quest."/>
	<missionstate id="2" description="You completed it."/>
</mission>
</quest>
	<quest name="Killing in the Name of..." startstorageid="1000" startstoragevalue="1">
		<mission name="Paw and Fur - Hunting Elite" storageid="14501" startvalue="0" endvalue="100">
			<missionstate id="0" description="You joined the 'Paw and Fur - Hunting Elite'. Ask Grizzly Adams for some hunting tasks."/>
			<missionstate id="1" description="You joined the 'Paw and Fur - Hunting Elite'. Ask Grizzly Adams for some hunting tasks. You already completed 1 of them."/>
			<missionstate id="2" description="You joined the 'Paw and Fur - Hunting Elite'. Ask Grizzly Adams for some hunting tasks. You already completed 2 of them."/>
			<missionstate id="3" description="You joined the 'Paw and Fur - Hunting Elite'. Ask Grizzly Adams for some hunting tasks. You already completed 3 of them."/>
			<missionstate id="4" description="You joined the 'Paw and Fur - Hunting Elite'. Ask Grizzly Adams for some hunting tasks. You already completed 4 of them."/>

So my login script should set those 2 storages to 1 so that they show up in the quest log but even in phpmyadmin it does not show the player having the storage values, what did I do wrong?

Solved it.
 
Last edited:
Back
Top