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

Help Whith a script.

Robbiet6

New Member
Joined
Feb 22, 2009
Messages
83
Reaction score
1
Hello guys sorry for asking what seems like a stupid question..

But i have tryed everything for my real map ot and i cannot seem to change the start level, it is set at 130 and ive tryed to edit BOTH....
CONFIG and WEBSITE CONFIG

Yet the level new players start at will not change, i have a feeling its something to do with my website but help would be appreciated its a very annoying problem..
Has anybody had this problem before and have an idea on what could be stopping the overuling the config from deciding what level new players start at.

Please Help.
 
Which server version is it?
Are you creating on the AAC?

Maybe go to your database, select the players table and see if there are characters like "Knight Sample", "Paladin Sample" etc.
If their level is 130 it is most likely the value you have to edit.
 
The server is 8.60,
Im not 100% what you mean by creating the character on the ACC please explain
And i have just tested for any Sample characters on the database and i cant find it, i am confused as hell im starting to think their isent a solution
thanks for the reply tho more help would be apreciated


I wonder is their a way to make a script that would overwrite anything and make the level start at 8 no matter what??
if so can anybody do it please?

- - - Updated - - -

Anyone?
 
XML:
 <?xml version="1.0" encoding="UTF-8"?>
<creaturescripts>
	<event type="death" name="tirecz" event="script" value="tirecz.lua"/>
	<event type="death" name="tp" event="script" value="PythiusTheRotten.lua"/>
	<event type="preparedeath" name="Arena" event="script" value="arena.lua"/>
        <event type="login" name="FimVip" event="script" value="vip.lua"/>
	<event type="login" name="CheckVip" script="endvip.lua"/>
	<event type="login" name="FirstItems" event="script" value="firstitems.lua"/>
	<event type="advance" name="recompensa" event="script" value="winner20k.lua"/>
	<event type="login" name="PlayerLogin" event="script" value="login.lua"/>
	 <event type="think" name="Idle" event="script" value="idle.lua"/>
	<event type="joinchannel" name="GuildMotd" event="script" value="guildmotd.lua"/>
	<event type="receivemail" name="Mail" event="script" value="mail.lua"/>
	<event type="reportbug" name="SaveReportBug" script="reportbug.lua"/>
	<event type="advance" name="AdvanceSave" event="script" value="advancesave.lua"/>
	<event type="logout" name="demonOakLogout" event="script" value="demonOakLogout.lua"/>
	<event type="death" name="demonOakDeath" event="script" value="demonOakDeath.lua"/>
	<event type="kill" name="ArenaKill" event="script" value="arenakill.lua"/>
	<event type="kill" name="kill" event="script" value="kill.lua"/>
	<event type="death" name="PythiusTheRotten" event="script" value="PythiusTheRotten.lua"/>
 	<event type="kill" name="KillingInTheNameOf" event="script" value="KillingInTheNameOf.lua"/>

	<!-- Inquisition Full Quest -->
	<event type="kill" name="inquisitionPortals" script="Inquisition.lua"/>

	<event type="think" name="SkullCheck" event="script" value="skullcheck.lua"/>

</creaturescripts>

Lua:
 local config = {
	
loginMessage = getConfigValue('loginMessage'),
	
useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}



function onLogin(cid)
	
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, "Idle")
	
if(config.useFragHandler) then
		
registerCreatureEvent(cid, "SkullCheck")
	
end
	
registerCreatureEvent(cid, "inquisitionPortals")
	
registerCreatureEvent(cid, "ReportBug")
	
registerCreatureEvent(cid, "AdvanceSave")
	
registerCreatureEvent(cid, "KillingInTheNameOf")

registerCreatureEvent(cid, "ExpVip")

registerCreatureEvent(cid, "ArenaKill")
	
registerCreatureEvent(cid, "reward")
	
registerCreatureEvent(cid, "FimVip")
registerCreatureEvent(cid, "VipReceive")
registerCreatureEvent(cid, "Arena")
	   
if getPlayerStorageValue(cid, 42309) < 1 then
        
for i = 42300, 42309 do
            
setPlayerStorageValue(cid, i, 0)
        
end
    
end
    
if getPlayerStorageValue(cid, 42319) < 1 then
        
for i = 42310, 42319 do
            
setPlayerStorageValue(cid, i, 0)
        
end
    
end
    
if getPlayerStorageValue(cid, 42329) < 1 then
        
for i = 42320, 42329 do
            
setPlayerStorageValue(cid, i, 0)
        
end
    
end
    
if getPlayerStorageValue(cid, 42355) == -1 then
        
setPlayerStorageValue(cid, 42355, 0) 
end
    
setPlayerStorageValue(cid, 42350, 0) 
setPlayerStorageValue(cid, 42352, 0) 
return true

end

- - - Updated - - -

If you need anything else please let me know this problem is realy hard to solve
 
Make a backup on your creaturescripts.xml and use this, just for trying:
Code:
 <?xml version="1.0" encoding="UTF-8"?>
<creaturescripts>
	<event type="death" name="tirecz" event="script" value="tirecz.lua"/>
	<event type="death" name="tp" event="script" value="PythiusTheRotten.lua"/>
	<event type="preparedeath" name="Arena" event="script" value="arena.lua"/>
	<event type="advance" name="recompensa" event="script" value="winner20k.lua"/>
	<event type="login" name="PlayerLogin" event="script" value="login.lua"/>
	<event type="think" name="Idle" event="script" value="idle.lua"/>
	<event type="joinchannel" name="GuildMotd" event="script" value="guildmotd.lua"/>
	<event type="receivemail" name="Mail" event="script" value="mail.lua"/>
	<event type="reportbug" name="SaveReportBug" script="reportbug.lua"/>
	<event type="advance" name="AdvanceSave" event="script" value="advancesave.lua"/>
	<event type="logout" name="demonOakLogout" event="script" value="demonOakLogout.lua"/>
	<event type="death" name="demonOakDeath" event="script" value="demonOakDeath.lua"/>
	<event type="kill" name="ArenaKill" event="script" value="arenakill.lua"/>
	<event type="kill" name="kill" event="script" value="kill.lua"/>
	<event type="death" name="PythiusTheRotten" event="script" value="PythiusTheRotten.lua"/>
 	<event type="kill" name="KillingInTheNameOf" event="script" value="KillingInTheNameOf.lua"/>
 
	<!-- Inquisition Full Quest -->
	<event type="kill" name="inquisitionPortals" script="Inquisition.lua"/>
 
	<event type="think" name="SkullCheck" event="script" value="skullcheck.lua"/>
 
</creaturescripts>
 
check your first items file
it may contain codes that add lvl automaticly to the players when they log for the first time
upload it so we can check it
you may obtained that file from a war project
 
Tryed it and has not worked, i ashume its something to do with my website since thats the only thing ive changed, Do you think its possible to find a script that can overwrite all the rules and be like number 1 priority for new characters being level 8,

Ive already edited my website config aswell it seems right but still unsure here: ( What else could it even be thats actualy stopping it? providing this config dosent have any errors. )


Lua:
 <?php
	// Available options: TFS_02, TFS_03
	// If ur using the old TFS 0.3.6pl1 distro from 2009, just leave it as TFS_02.
	$config['TFSVersion'] = 'TFS_03';
	
	$config['site_title'] = 'Darkness Real Map!';
	$config['site_title_context'] = 'Invite Your FRIENDS!';
	
	// ------------------------ \\
	// MYSQL CONNECTION DETAILS \\
	// ------------------------ \\
	
	// phpmyadmin username for OT server: (DONT USE "root" if ur hosting to public.).
	$config['sqlUser'] = 'fidgitz123';
	
	// phpmyadmin password for OT server:
	$config['sqlPassword'] = 'simaycem123';
	
	// The database name to connect to. (This is usually same as username).
	$config['sqlDatabase'] = 'fidgitz123';
	
	// Hostname is usually localhost or 127.0.0.1.
	$config['sqlHost'] = 'localhost';
	
	// ------------------- \\
	// CUSTOM SERVER STUFF \\
	// ------------------- \\
	
	// Vocation ids and names.
	$config['vocations'] = array(
		0 => 'No vocation',
		1 => 'Sorcerer',
		2 => 'Druid',
		3 => 'Paladin',
		4 => 'Knight',
		5 => 'Master Sorcerer',
		6 => 'Elder Druid',
		7 => 'Royal Paladin',
		8 => 'Elite Knight',
	);
	
	// Town ids and names: (In RME map editor, open map, click CTRL + T to view towns, their names and their IDs. 
	// townID => 'townName'
	$config['towns'] = array(
		0 => 'Town 0',
		1 => 'Town 1',
		2 => 'Town 2',
	);
	
	$config['war_status'] = array(
		0 => 'Pending..',
		1 => 'Accepted',
		2 => 'Rejected',
		3 => 'Cancelled',
		4 => '???',
		5 => 'Ended',
	);
	
	// ---------------- \\
	// Create Character \\
	// ---------------- \\
	
	// Max characters on each account:
	$config['max_characters'] = 7;
	
	// Available character vocation users can create.
	$config['available_vocations'] = array(1, 2, 3, 4);
	
	// Available towns (specify town ids, etc: (0, 1, 2); to display 3 town options (town id 0, 1 and 2).
	$config['available_towns'] = array(1);
	
	$config['level'] = 8;
	$config['health'] = 185;
	$config['mana'] = 35;
	$config['cap'] = 435;
	$config['soul'] = 0;
	
	$config['maleOutfitId'] = 128;
	$config['femaleOutfitId'] = 138;
	// $config['']
	
	// No vocation info (if user select vocation id 0, we force thees configurations on him
	$config['nvlevel'] = 8;
	$config['nvHealth'] = 150;
	$config['nvMana'] = 50;
	$config['nvCap'] = 400;
	$config['nvSoul'] = 0;
	
	$config['nvForceTown'] = 0; // Force a town to no vocation even though he selected something else? 0 = no, 1 = yes.
	$config['nvTown'] = 0; // Town id to force no vocations to get to, if nvForceTown is 1.
	
	// Minimum allowed character name letters. Etc 4 letters: "Kåre".
	$config['minL'] = 4;
	// Maximum allowed character name letters. Etc 20 letters: "Bobkåreolesofiesberg"
	$config['maxL'] = 20;
	
	// Maximum allowed character name words. Etc 2 words = "Bob Kåre", 3 words: "Bob Arne Kåre" as max char name words.
	$config['maxW'] = 2;
	
	// -------------- \\
	// WEBSITE STUFF  \\
	// -------------- \\
	$config['validate_IP'] = false; // Only allow legal IP addresses to register and create character.
	$config['salt'] = false; // Some noob 0.3.6 servers don't support salt.
	
	// Restricted names
	$config['invalidNameTags'] = array("god", "gm", "cm", "gamemaster", "hoster", "admin", "admim", "adm", "owner", "staff");
	
	// Level requirement to create guild? (Just set it to 1 to allow all levels).
	$config['create_guild_level'] = 8;
	
	// Change Gender can be purchased in shop, or perhaps you want to allow everyone to change gender for free?
	$config['free_sex_change'] = false;
	
	// Do you need to have premium account to create a guild?
	$config['guild_require_premium'] = false;
	
	$config['guildwar_enabled'] = true;
	
	// Use htaccess rewrite? (basically this makes website.com/username work instead of website.com/characterprofile.php?name=username
	// Linux users needs to enable mod_rewrite php extention to make it work properly, so set it to false if your lost and using Linux.
	$config['htwrite'] = true;
	
	// What client version and server port are you using on this OT?
	// Used for the Downloads page.
	$config['client'] = 860; // 860 = tibia 8.60
	
	 // Download link to client. Recommended:
	 // Select download link from remere map editor website!
	 // See list of clients: [url=http://remeresmapeditor.com/marklar.php?clients]Download - Remere's Map Editor (RME) - An Open Source Map Editor for Open Tibia[/url]
	$config['client_download'] = 'http://remeresmapeditor.com/rmedl.php?file=tibia'. $config['client'] .'.exe';
	
	$config['port'] = 7171; // Port number to connect to your OT.
	
	// How often do you want highscores to update?
	$config['cache_lifespan'] = 60 * 15; // 15 minutes.
	
	// WARNING! Account names written here will have admin access to web page!
	$config['page_admin_access'] = array(
		'121038',
		'1',
	);
	
	// Guilds and guild war pages will do lots of queries on bigger databases.
	// So its recommended to require login to view them, but you can disable this
	// If you don't have any problems with load.
	$config['require_login'] = array(
		'guilds' => false,
		'guildwars' => false,
	);
	
	// IMPORTANT! Write a character name(that exist) that will represent website bans!
	// Or create character "God Website".
	// If you don't do this, bann from admin panel won't work properly.
	$config['website_char'] = 'Admin Fidgitz';
	
	// date format
	$config['date'] = "d F Y (H:i)";
	
	// --------------- \\
	// ADVANCED STUFF  \\
	// --------------- \\
	
	// Don't touch this unless you know what you are doing. (modifying this(key value) also requires modifications in OT files /XML/commands.xml).
	$config['ingame_positions'] = array(
		1 => 'Player',
		2 => 'Tutor',
		3 => 'Gamemaster',
		4 => 'Community Manager',
		5 => 'God',
	);
	
	// Enable OS advanced feautures? false = no, true = yes
	$config['os_enabled'] = true;
	
	// What kind of computer are you hosting this website on?
	// Available options: LINUX or WINDOWS
	$config['os'] = 'WINDOWS';
	
	// Measure how much players are lagging in-game. (Not completed). 
	$config['ping'] = false;
	
	// BAN STUFF - Don't touch this unless you know what you are doing.
	// You can order the lines the way you want, from top to bot, in which order you
	// wish for them to be displayed in admin panel. Just make sure key[#] represent your describtion.
	$config['ban_type'] = array(
		4 => 'NOTATION_ACCOUNT',
		2 => 'NAMELOCK_PLAYER',
		3 => 'BAN_ACCOUNT',
		5 => 'DELETE_ACCOUNT',
		1 => 'BAN_IPADDRESS',
	);
	
	// BAN STUFF - Don't touch this unless you know what you are doing.
	// You can order the lines the way you want, from top to bot, in which order you
	// wish for them to be displayed in admin panel. Just make sure key[#] represent your describtion.
	$config['ban_action'] = array(
		0 => 'Notation',
		1 => 'Name Report',
		2 => 'Banishment',
		3 => 'Name Report + Banishment',
		4 => 'Banishment + Final Warning',
		5 => 'NR + Ban + FW',
		6 => 'Statement Report',
	);
	
	// Ban reasons, for changes beside default values to work with client,
	// you also need to edit sources (tools.cpp line 1096)
	$config['ban_reason'] = array(
		0 => 'Offensive Name',
		1 => 'Invalid Name Format',
		2 => 'Unsuitable Name',
		3 => 'Name Inciting Rule Violation',
		4 => 'Offensive Statement',
		5 => 'Spamming',
		6 => 'Illegal Advertising',
		7 => 'Off-Topic Public Statement',
		8 => 'Non-English Public Statement',
		9 => 'Inciting Rule Violation',
		10 => 'Bug Abuse',
		11 => 'Game Weakness Abuse',
		12 => 'Using Unofficial Software to Play',
		13 => 'Hacking',
		14 => 'Multi-Clienting',
		15 => 'Account Trading or Sharing',
		16 => 'Threatening Gamemaster',
		17 => 'Pretending to Have Influence on Rule Enforcement',
		18 => 'False Report to Gamemaster',
		19 => 'Destructive Behaviour',
		20 => 'Excessive Unjustified Player Killing',
		21 => 'Spoiling Auction',
	);
	
	// BAN STUFF
	// Ban time duration selection in admin panel
	// seconds => describtion
	$config['ban_time'] = array(
		3600 => '1 hour',
		21600 => '6 hours',
		43200 => '12 hours',
		86400 => '1 day',
		259200 => '3 days',
		604800 => '1 week',
		1209600 => '2 weeks',
		2592000 => '1 month',
	);
	
	
		// --------------- \\
		// SECURITY STUFF  \\
		// --------------- \\
		
	/* Token is a teqnique used to avoid some cross site scripting.
		Basically, it forces input forms to be submitted from your site
		I got it working, like... Halfway. 
		
		If you get any problems with it, you can disable it, but be careful,
		don't use insecure code, and always verify/sanitize post data.*/ 
	$config['use_token'] = false;
	
	/*	Store visitor data
		Store visitor data in the database, logging every IP visitng site, 
		and how many times they have visited the site. And sometimes what
		they do on the site.
		
		This helps to prevent POST SPAM (like register 1000 accounts in a few seconds)
		and other things which can stress and slow down the server.
		
		The only downside is that database can get pretty fed up with much IP data
		if table never gets flushed once in a while. So I highly recommend you
		to configure flush_ip_logs if IPs are logged.
	*/
	
	$config['log_ip'] = false;
	
	// Flush IP logs each configured seconds, 60 * 15 = 15 minutes.
	// Set to false to entirely disable ip log flush. 
	// It is important to flush for optimal performance.
	$config['flush_ip_logs'] = 59 * 27;
	
	/*	IP SECURTY REQUIRE: $config['log_ip'] = true;
		Configure how tight this security shall be.
		Etc: You can max click on anything/refresh page
		[max activity] 15 times, within time period 10
		seconds. During time_period, you can also only
		register 1 account and 1 character.
	*/
	$config['ip_security'] = array(
		'time_period' => 10, // In seconds
		'max_activity' => 10, // page clicks/visits
		'max_post' => 6, // register, create, highscore, character search such actions
		'max_account' => 1, // register
		'max_character' => 1, // create char
	);
	
	//////////////
	/// PAYPAL ///
	//////////////

	// Write your paypal address here, and what currency you want to recieve money in.
	$config['paypal'] = array(
		'enabled' => true,
		'email' => '[email protected]', // Example: [email][email protected][/email]
		'currency' => 'EUR',
		'points_per_currency' => 45, // 1 currency = ? points? [ONLY used to calculate bonuses]
		'success' => "http://".$_SERVER['HTTP_HOST']."/success.php",
		'failed' => "http://".$_SERVER['HTTP_HOST']."/failed.php",
		'ipn' => "http://".$_SERVER['HTTP_HOST']."/ipn.php",
	);

	// Configure the "buy now" buttons prices, first write price, then how many points you get.
	// Giving some bonus points for higher donations will tempt users to donate more.
	$config['paypal_prices'] = array(
	//	price => points,
		1 => 45, // -10% bonus
		3 => 150, // 0% bonus
		5 => 230, // +10% bonus
		9 => 470, // +20% bonus
		16 => 900, // +30% bonus
		25 => 2000, // +40% bonus
	);
	
	//////////////////
	/// PAYGOL SMS ///
	//////////////////
	// !!! Paygol takes 60%~ of the money, and send aprox 40% to your paypal.
	// You can configure paygol to send each month, then they will send money to you 1 month after recieving 50+ eur.
	$config['paygol'] = array(
		'enabled' => true,
		'serviceID' => 40355,// Service ID from paygol.com
		'currency' => 'EUR', // Currency from paygol.com
		'price' => 1, // cost, same as paygol.com
		'points' => 35, // Points, same as paygol.com
		'name' => '35 points',
		'returnURL' => "http://".$_SERVER['HTTP_HOST']."/success.php",
		'cancelURL' => "http://".$_SERVER['HTTP_HOST']."/failed.php",
		'ipnURL' => "http://".$_SERVER['HTTP_HOST']."/paygol_ipn.php",
	);
	
	////////////
	/// SHOP ///
	////////////
	// If useDB is set to true, player can shop in-game as well using Znote LUA shop system plugin.
	$config['shop'] = array(
		'enabled' => true,
		'useDB' => false, // Fetch offers from database, or the below config array
	);

	// If useDB is false, this array list will be used for shop offers.
	$config['shop_offers'] = array(
		// offer 2
		2 => array(
			'type' => 2160,
			'itemid' => 2160,
			'count' => 10,
			'describtion' => "10 Crystal coins.",
			'points' => 20,
		),
		
		// offer 150
		91 => array(
			'type' => 6132,
			'itemid' => 6132,
			'count' => 1,
			'describtion' => "Soft Boots!.",
			'points' => 20,
		),
		// offer 110
		11 => array(
			'type' => 1,
			'itemid' => 2646,
			'count' => 1,
			'describtion' => "Golden Boots arm 5 speed +30!",
			'points' => 30,
		),
		// offer 1106
		155 => array(
			'type' => 1,
			'itemid' => 8918,
			'count' => 1,
			'describtion' => "Spellbook ml +3",
			'points' => 15,
		),
		// offer 11016
		1515 => array(
			'type' => 1,
			'itemid' => 2523,
			'count' => 1,
			'describtion' => "Blessed Shield Defence 40",
			'points' => 15,
		),
		//offer 1103316
		153315 => array(
			'type' => 1,
			'itemid' => 2474,
			'count' => 1,
			'describtion' => "Winged Helmet speed+20",
			'points' => 15,
		),
		// offer 111016
		15115 => array(
			'type' => 1,
			'itemid' => 2522,
			'count' => 1,
			'describtion' => "Great Shield Defence 38",
			'points' => 10,
		),
		// offer 111016
		15115 => array(
			'type' => 1,
			'itemid' => 2503,
			'count' => 1,
			'describtion' => "Dwarven Armor FOR ALL VOCS (Arm:16, club fighting +5, sword fighting +5, axe fighting +5, distance fighting +6).)",
			'points' => 20,
		),
		// offer 1110116
		151115 => array(
			'type' => 1,
			'itemid' => 8865,
			'count' => 1,
			'describtion' => "(DARK LORDS CAPE ONLY FOR SORC -Arm:11, magic level +5, protection holy -8%, death +4%).",
			'points' => 20,
		),
		// offer 111220116
		15112125 => array(
			'type' => 1,
			'itemid' => 8866,
			'count' => 1,
			'describtion' => "(SERPENT COAT ONLY FOR DRUIDS ML +3).",
			'points' => 20,
		),
		// offer 6
		3 => array(
			'type' => 1,
			'itemid' => 2469,
			'count' => 1,
			'describtion' => "Dragon Scale Legs arm 10",
			'points' => 15,
		),
		// offer 6111
		3111 => array(
			'type' => 1,
			'itemid' => 2495,
			'count' => 1,
			'describtion' => "Demon Legs",
			'points' => 10,
		),
	    // offer 4
		4 => array(
			'type' => 1,
			'itemid' => 2504,
			'count' => 1,
			'describtion' => "Dwarven Legs arm 7 protection physical +3%",
			'points' => 10,
		),
		// offer 999991
		1092789 => array(
			'type' => 1,
			'itemid' => 9778,
			'count' => 1,
			'describtion' => "Yalahari Mask Ml +3",
			'points' => 15,
		),
		// offer 9999911
		10192789 => array(
			'type' => 1,
			'itemid' => 2471,
			'count' => 1,
			'describtion' => "Golden Helmet",
			'points' => 15,
		),
		// offer 99999211
		102192789 => array(
			'type' => 1,
			'itemid' => 7366,
			'count' => 1,
			'describtion' => "Viper Star Attack 70.",
			'points' => 30,
		),
		// offer 9991199211
		10211912789 => array(
			'type' => 1,
			'itemid' => 2390,
			'count' => 1,
			'describtion' => "Magic Longsword Attack 60.",
			'points' => 20,
		),
		// offer 999199211
		1021192789 => array(
			'type' => 1,
			'itemid' => 8925,
			'count' => 1,
			'describtion' => "Solar Axe Attack 60.",
			'points' => 20,
		),
		// offer 99911199211
		1021119112789 => array(
			'type' => 1,
			'itemid' => 8266,
			'count' => 1,
			'describtion' => "17:05 You see koshei's ancient amulet (protection holy -50%, death +8%).
It weighs 5.00 oz.",
			'points' => 15,
		),
		5 => array(
			'type' => 3,
			'itemid' => 0,
			'count' => 0,
			'describtion' => "Change character gender.",
			'points' => 5,
		),
	);
?>
 
The only way to getting levels is by config, website config, creaturescripts, movements <-- special tile, globalevent.
 
Why all your players are copy samples? you need edit Samples
Sorcerer Sample, Knigth, Paladin, Druid..
to 130 and create again your players for copy level 130 ;)
or use this simple script i created for you, all players are level 130 onlogin and don't down level never max level low is 130..
is creature script..
script.lua
Lua:
function onLogin(cid)
	if getPlayerLevel(cid) < 130 then
	doPlayerAddExperience(cid, (getExperienceForLevel(130) - getPlayerExperience(cid)))
end
return TRUE
end
creaturescripts.xml
Lua:
	<event type="login" name="level130" event="script" value="script.lua"/>
 
Why all your players are copy samples? you need edit Samples
Sorcerer Sample, Knigth, Paladin, Druid..
to 130 and create again your players for copy level 130 ;)
or use this simple script i created for you, all players are level 130 onlogin and don't down level never max level low is 130..
is creature script..
script.lua
Lua:
function onLogin(cid)
	if getPlayerLevel(cid) < 130 then
	doPlayerAddExperience(cid, (getExperienceForLevel(130) - getPlayerExperience(cid)))
end
return TRUE
end
creaturescripts.xml
Lua:
	<event type="login" name="level130" event="script" value="script.lua"/>

Cronox i think you missunderstood him, he want to change the max level, no keep the level 130 :p but thanks to you i got idea, which may works :p

Replace your login.lua with this:

Lua:
local config = {
 
loginMessage = getConfigValue('loginMessage'),
 
useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}
 
 
 
function onLogin(cid)
	if isPlayer(cid) and getPlayerLastLoginSaved(cid) == 0 then
		if getPlayerLevel(cid) == 130 then
			doPlayerAddExperience(cid, -(getExperienceForLevel(122) - getPlayerExperience(cid)))
		end
	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, "Idle")
 
if(config.useFragHandler) then
 
registerCreatureEvent(cid, "SkullCheck")
 
end
 
registerCreatureEvent(cid, "inquisitionPortals")
 
registerCreatureEvent(cid, "ReportBug")
 
registerCreatureEvent(cid, "AdvanceSave")
 
registerCreatureEvent(cid, "KillingInTheNameOf")
 
registerCreatureEvent(cid, "ExpVip")
 
registerCreatureEvent(cid, "ArenaKill")
 
registerCreatureEvent(cid, "reward")
 
registerCreatureEvent(cid, "FimVip")
registerCreatureEvent(cid, "VipReceive")
registerCreatureEvent(cid, "Arena")
 
if getPlayerStorageValue(cid, 42309) < 1 then
 
for i = 42300, 42309 do
 
setPlayerStorageValue(cid, i, 0)
 
end
 
end
 
if getPlayerStorageValue(cid, 42319) < 1 then
 
for i = 42310, 42319 do
 
setPlayerStorageValue(cid, i, 0)
 
end
 
end
 
if getPlayerStorageValue(cid, 42329) < 1 then
 
for i = 42320, 42329 do
 
setPlayerStorageValue(cid, i, 0)
 
end
 
end
 
if getPlayerStorageValue(cid, 42355) == -1 then
 
setPlayerStorageValue(cid, 42355, 0) 
end
 
setPlayerStorageValue(cid, 42350, 0) 
setPlayerStorageValue(cid, 42352, 0) 
return true
 
end

- - - Updated - - -

Also remeber only characters which never logged in, this script will execute then.
 
He don't need changed all login.lua, made by have diferent version or login edit.. you added this
Lua:
function onLogin(cid)
	if isPlayer(cid) and getPlayerLastLoginSaved(cid) == 0 then
		if getPlayerLevel(cid) == 130 then
			doPlayerAddExperience(cid, -(getExperienceForLevel(122) - getPlayerExperience(cid)))
		end
	end
and my script take level 130 every players connect.
 
Cronox, its better to add it in login.lua, since it will then execute first than a seprate lua.
 
Back
Top