-
Posts
794 -
Joined
-
Last visited
-
Days Won
3
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Everything posted by AinsLord
-
well im used to use the old rathena way back 3 or 4mos ago does the new rathena still supports 20120410 client??? if yes how can i do it any instructions guys?? thnx for the asnwers im trying to create a server using the new rathena version but it seems it changed a lot regarding the packet.h etc coz usually ill just change the packet ver on mmo.h but now its different any help with fellow devs here thnx
-
rm: cannot remove `/var/lock/subsys/httpd': Read-only file system rm: cannot remove `/var/run/httpd/httpd.pid': Read-only file system Starting httpd: httpd: apr_sockaddr_info_get() failed for c999957935-cloudpro-744654866.cloudatcost.com httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName (30)Read-only file system: httpd: could not open error log file /etc/httpd/logs/error_log. Unable to open logs those are the errors when i typed service httpd restart anyone can help me please thnx for the answer
-
sql files will be generated automatically
-
Skill delay questions || setting up a fixed delay on some skills
AinsLord replied to AinsLord's question in Database Support
is this on pre - re or RE?? EDIT : this is for renewal how bout this 62,700,0,0,0,0,160 this is for pre - re -
Skill delay questions || setting up a fixed delay on some skills
AinsLord posted a question in Database Support
i made my server agi/dex base some skills are OP on spams how can i set like fixed delays on those skills like Bowling bash thnx for the answer <3 -
thnx man i saw it
-
what should i do on that part sorry kinda noob on some scripts
-
where is that??
-
bump to this i really need help im trying my best to find out what seems to be the wrong
-
hello i have some error on your script [SQL]: DB error - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '`SELECT `name` FROM `guild` WHERE `guild_id` = '10'' at line 1 [Debug]: at script.c:16506 - `SELECT `name` FROM `guild` WHERE `guild_id` = '10' [Debug]: Source (NPC): Guild Master at morocc (155,91) NPC is working but everytime i check the code that will show up on console thnx for the help
-
Need Help || MVP room using item to enter or summon an MVP
AinsLord replied to AinsLord's question in Script Requests
that on uses zeny ohh well thnx -
i have this error show on my console [SQL]: DB error - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '`SELECT `name` FROM `guild` WHERE `guild_id` = '10'' at line 1 [Debug]: at script.c:16506 - `SELECT `name` FROM `guild` WHERE `guild_id` = '10' [Debug]: Source (NPC): Guild Master at morocc (155,91) and this is the script i have (c) to owner // Copyrights Notice // ======================================================== // This work is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License. // To view a copy of this license, visit http://creativecommons.org/licenses/by-nc/4.0/. // ======================================================== // Introduction // ======================================================== // Copyrights 2015-2020 Jordan Lacandula All rights reserved // ======================================================== // Script: Guild Package Giver/Redeemer NPC // ======================================================== // Programmer: Jordan Lacandula // Website: For more info, visit http://jordanlacandula.tk/ // ======================================================== // Bug Report/Job Request // ======================================================== // Email: [email protected] // Skype: jordan.lacandula // ======================================================== // Features/Includes // ======================================================== // SQL Database Support // used table names `gpack_code` and `guild_package` // Duplicate IP Checking (also supports same IP, see below) // Account Checking // Online Status Checker // Easy to change Package items for guild master // Easy to change Package items for guild member // Minimum Guild members Checking (default: 8) // ======================================================== // Multiple IP ( Use gpack code to bypass IP Checking ) // ======================================================== // End Introduction // ======================================================== morocc,155,91,5 script Guild Master 421,{ if( getgmlevel() == 99 ){ set .c_length,10; setarray .g_code$[0],"A","B","C","D","E","F","G","H","I","J","K","L", "M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","0","1","2","3","4","5","6","7","8","9"; mes "What can i do for you Sire?"; switch(select("Nothing:View Code List:^FF0000 Add Package Code^000000")){ case 1: break; case 2: query_sql("SELECT `guild_id`, `gcode`,`status` FROM `gpack_code` ORDER BY `status` DESC",.@glist,.@codeview$,.@stts); dispbottom "Status | GPack Code"; for(set @ei,0; @ei < getarraysize(.@codeview$); set @ei,@ei + 1){ query_sql("`SELECT `name` FROM `guild` WHERE `guild_id` = '"+.@glist[@ei]+"'",.@gn$); dispbottom ""+.@stts[@ei]+" | "+.@codeview$[@ei]+" | "+.@gn$+""; } close; break; case 3: next; mes "Creating New Code for Guild: "; input .@rguild$; set .@cr,query_sql("SELECT `guild_id` FROM `guild` WHERE `name` = '"+.@rguild$+"'",.@g); if(.@cr <= 0){ mes "^FF0000 Guild Not Found!^000000"; close; } for(set @i, 0; @i< .c_length; set @i, @i+1) { set @random_char, rand(0,(getarraysize(.g_code$)-1)); set @new_code$, @new_code$ + .g_code$[@random_char]; } query_sql "INSERT INTO `gpack_code` (`guild_id`, `gcode`, `status`) VALUES ('"+.@g+"', '"+@new_code$+"', '0')"; set @new_code$, ""; next; mes "Added Code for Guild"; mes "^FF0000 "+.@rguild$+"^000000"; close; break; } mes "Proceeding to Player View"; next; } set .@hascode,0; set .@code$,"null"; setarray .@gmaster[0],49994,1; //gmaster pack setarray .@gmember[0],49995,1; //gmember pack if(getcharid(2) == 0){ mes "you're not member of a guild"; close; } query_sql("SELECT `master` FROM `guild` WHERE `guild_id` = '"+getcharid(2)+"'",.@gid$); if(.@gid$ != strcharinfo(0)){ mes "Only Guild Masters can claim the packages"; close; } mes "^FF0000 Guild Package^000000"; mes "Greetings ^FF0000 "+strcharinfo(0)+"^000000"; mes "Master of the Guild^FF0000 "+strcharinfo(2)+"^000000."; next; mes "Do you have code?"; switch(select("No:Yes")){ case 1: break; case 2: input .@code$; mes "Verifying Code"; mes "Please Wait...."; set .@csr,query_sql("SELECT `gcode` FROM `gpack_code` WHERE `gcode` = '"+.@code$+"'"); if ( .@csr <= 0 ){ next; mes "^FF0000 Invalid Code^000000"; mes "Codes are Case-Sensitive, Please make sure of it."; close; } query_sql("SELECT `status` FROM `gpack_code` WHERE `gcode` = '"+.@code$+"'",.@used); if( .@used != 0 ){ mes "Guild Package code has been used already"; close; } set .@hascode,1; break; } next; mes "Do you wish to claim your ^FF0000 Guild Package^000000 ?"; switch(select("No:Yes")){ case 1: close; break; case 2: next; mes "^FF0000 CLAIM GUILD PACKAGE^000000 "; mes "Master will receive the following:"; for ( set .@i, 0; .@i < getarraysize(.@gmaster); set .@i, .@i + 2 ) mes .@gmaster[.@i+1] + " x " + getitemname(.@gmaster[.@i]); next; mes "^FF0000 CLAIM GUILD PACKAGE^000000 "; mes "Members will receive the following:"; for ( set .@i, 0; .@i < getarraysize(.@gmember); set .@i, .@i + 2 ) mes .@gmember[.@i+1] + " x " + getitemname(.@gmember[.@i]); next; mes "[^FF0000 Warning^000000 ]"; mes "Every one in your Guild can only claim Once regarding of their IP."; mes "Only Online characters can claim a Guld Package"; mes "No special treatments if characters go offline while in process of claiming"; next; mes "^FF0000 NOTE:^000000 You can only claim once."; mes "^FF0000 NOTE:^000000 All members should be online."; mes "^FF0000 NOTE:^000000 Make sure everyone have lots of Space in their inventory."; next; mes "^FF0000 CLAIM GUILD PACKAGE^000000 "; mes "Claim now?"; switch(select("No:Yes")){ case 1: close; break; case 2: next; set .@mm,8; //required minimum members setarray .@claimerlist$[0],"null"; set .@resultcount,query_sql("SELECT `name` FROM `guild_member` WHERE `guild_id` = '"+getcharid(2)+"'",.@claimerlist$); if( .@resultcount < .@mm ){ mes "Should have Total of "+.@mm +" members."; close; break; } // enforce IP check when code is not available if( .@hascode == 0 ){ setarray .@iplist$[0],"null"; // same ip check for( set .@i,0; .@i < .@resultcount; set .@i,.@i+1 ){ query_sql("SELECT `account_id` FROM `char` WHERE `name` = '"+.@claimerlist$[.@i]+"'",.@z); query_sql("SELECT `last_ip` FROM `login` WHERE `account_id` = '"+.@z+"'",.@il$); //check for duplicates for( set .@j,0; .@j < .@i; set .@j,.@j+1 ){ if( .@il$ == .@iplist$[.@j] ){ mes "^FF0000 Duplicate IP Address^000000"; mes "^FF0000 NOTE:^000000 Each player should have different IP address"; mes "If you should not see this, Please report to admin"; close; } } //add to list setarray .@iplist$[.@i],.@il$; } } for( set .@i,0; .@i < .@resultcount; set .@i,.@i+1 ){ //account check query_sql("SELECT `account_id` FROM `char` WHERE `name` = '"+.@claimerlist$[.@i]+"'",.@x); set .@haspack,query_sql("SELECT FROM `guild_package` WHERE `acc_id` = '"+.@x+"'"); //ip check query_sql("SELECT `last_ip` FROM `login` WHERE `account_id` = '"+.@x+"'",.@xx); set .@haspack,query_sql("SELECT FROM `guild_package` WHERE `claim_ip` = '"+.@xx+"'"); //character name check set .@haspack3,query_sql("SELECT `char_name` FROM `guild_package` WHERE `char_name` = '"+.@claimerlist$[.@i]+"'"); if(.@haspack > 0 || .@haspack2 > 0 || .@haspack3 > 0){ mes "One or more in your member(s) has already received the package."; close; break; } } // TODOs: check if master and all members are online set .@onlinechk,query_sql("SELECT `name` FROM `guild_member` WHERE `guild_id` = '"+getcharid(2)+"' AND `online` = 0"); if( .@onlinechk > 0 ){ mes "Make sure all members are online"; close; break; } for ( set .@j,0; .@j < .@resultcount; set .@j,.@j+1 ){ if( .@claimerlist$[.@j] == strcharinfo(0)){ for ( set .@i, 0; .@i < getarraysize(.@gmaster); set .@i, .@i + 2 ) getitem .@gmaster[.@i], .@gmaster[.@i+1]; }else{ for ( set .@i, 0; .@i < getarraysize(.@gmember); set .@i, .@i + 2 ) atcommand "#item "+.@claimerlist$[.@j]+" "+.@gmember[.@i]+" "+.@gmember[.@i+1]+""; } set .@acid,"null"; query_sql("SELECT `account_id` FROM `guild_member` WHERE `name` = '"+.@claimerlist$[.@j]+"'",.@acid); query_sql("SELECT `last_ip` FROM `login` WHERE `account_id` = '"+.@acid+"'",.@c_ip$); query_sql("SELECT `last_mac` FROM `login` WHERE `account_id` = '"+.@acid+"'",.@c_mac$); query_sql("SELECT `last_cpu` FROM `login` WHERE `account_id` = '"+.@acid+"'",.@c_cpu$); query_sql("SELECT `last_motherboard` FROM `login` WHERE `account_id` = '"+.@acid+"'",.@c_mb$); query_sql("SELECT `char_id` FROM `char` WHERE `name` = '"+.@claimerlist$[.@j]+"'",.@mem_id); query_sql "INSERT INTO `guild_package` (`acc_id`, `char_id`, `char_name`, `guild_id`, `guild_name`, `guild_master`, `claim_ip`, `claim_mac`, `claim_cpu`, `claim_motherboard`) VALUES ('"+.@acid+"','"+.@mem_id+"','"+.@claimerlist$[.@j]+"','"+getcharid(2)+"','"+strcharinfo(2)+"','"+strcharinfo(0)+"','"+.@c_ip$+"','"+.@c_mac$+"','"+.@c_cpu$+"','"+.@c_mb$+"')"; } next; mes "Package has been Distributed."; close2; query_sql("UPDATE `gpack_code` SET `guild_id` = '"+getcharid(2)+"', `status` = '1' WHERE `gcode` = '"+.@code$+"'"); announce "The Guild "+strcharinfo(2)+" has Signed Up for war",BC_ALL,0xFF0000; break; } break; } switch(rand(1,4)){ case 1: npctalk "Hey you noob, your turn"; sleep 1000; npctalk "Oh you're not noob? Then prove it in WOE"; break; case 2: npctalk "Next!"; break; case 3: npctalk "NEXT NEXT NEXT, Move Faster"; break; case 4: npctalk "No more? Good."; } OnInit: waitingroom "Claim Guild Package Here",0; query_sql "CREATE TABLE IF NOT EXISTS `guild_package` ( `acc_id` INT NOT NULL UNIQUE, `char_id` INT NOT NULL, `char_name` TEXT NOT NULL, `guild_id` INT NOT NULL, `guild_name` TEXT NOT NULL, `guild_master` TEXT NOT NULL, `claim_ip` TEXT NOT NULL, `claim_mac` TEXT NOT NULL, `claim_cpu` TEXT NOT NULL, `claim_motherboard` TEXT NOT NULL ) ENGINE=MyISAM"; query_sql "CREATE TABLE IF NOT EXISTS `gpack_code` (`guild_id` INT NOT NULL, `gcode` VARCHAR(10) NOT NULL, `status` INT NOT NULL ) ENGINE=MyISAM"; end; } anyone can help me with this thnx
-
Need Help || MVP room using item to enter or summon an MVP
AinsLord posted a question in Script Requests
is there any MVP room script like you'll rent the room party/solo/guild using item like TCG and summoning using TCG also?? thnx in advance -
Help Anti bot script found here @ rathena forums
AinsLord replied to AinsLord's question in Scripting Support
what does this anti bot do any screen shots?? -
- script Anti -1,{ OnPCLoginEvent: atcommand "@option 2"; sc_start SC_BERSERK,10000000,1; mes "Please Red Colour Key in the Code..."; set .Code,rand(1000,99999); mes "^0000FF"+rand(1,9999)+"^FF0000"+.Code+"^0000FF"+rand(1,9999)+"^000000"; input @Code; if( @Code != .Code ){ atcommand "@kick "+strcharinfo(0); }else{ atcommand "@option 0"; sc_end SC_BERSERK; } close; end; }- script Anti -1,{ OnPCLoginEvent: atcommand "@option 2"; sc_start SC_BERSERK,10000000,1; mes "Please Red Colour Key in the Code..."; set .Code,rand(1000,99999); mes "^0000FF"+rand(1,9999)+"^FF0000"+.Code+"^0000FF"+rand(1,9999)+"^000000"; input @Code; if( @Code != .Code ){ atcommand "@kick "+strcharinfo(0); }else{ atcommand "@option 0"; sc_end SC_BERSERK; } close; end; } it removes mount and falcons once logged back in thnx for the help
-
parse_line: expected ')' 40 : atcommand "@jail "+strcharinfo(0)+""; 41 : set botter,1; 42 : sc_start SC_BERSERK, 1000000000, 1; 43 : sc_start SC_FREEZE, 1000000000, 1; 44 : sleep2 3000; * 45 : for(set botter,botter; botter < 4; set botter,botter + 1';')}{ 46 : set .@String$,GetString( 15,rand(3,7) ); 47 : mes "You Have 3 Chance to Type the Red Text Correctly"; 48 : mes "If you failed- You will be jailed"; 49 : mes "Input the ^FF0000RED COLOUR^000000 part"; 50 : mes "^0000FF"+GetString( 15,rand(5,10) )+"^FF0000"+.@String$+"^0000FF"+GetString( 15,rand(3,10) )+"^000000"; [Error]: npc_parsesrcfile: Unknown syntax in file 'npc/custom/ains/antibot.txt', line '45'. Stopping... got that error
-
alam ko pre-re ung server well yea sabi nila no bots daw pero let see in a long run hahah ung mga loaders eh mga essentials lng nmn ata pwd makuha like battle manuals elite potion box etc wla nmn atang gears (FOR NOW) cnabe mo pa sa private nga lang eh pag mei donator galit na eh hahaha
-
nag uumpisa palang ako mag build ng own server ko not all players are willing to play pRO like the old times and yes the hype is there but in some reason nasanay na mga RO players sa fast paced RO even 99/70 mapa LR/HR/SHR pa yan maybe the reason kung bkt gs2 nila cla lng ang RO server is for them to take all the DONATIONS i also heard na OBT plng mei TOP UP Bonuses na agad
-
gumamit po ako ng nemo tpos pinatch ko ung increase damage display then after try ko xa in game pero dpo xa nag aapply ung disable dual window and space on guild name nag apply pero ung attack display ayaw po pa help naman po CLIENT VER 20120410 thx EDIT: it applies on skill damage but on normal damage it doesnt still 65k++
-
i've tried to use NEMO to increase attack display after saving the file it doesnt apply on game anyone can help me with this
-
bonus bAbsorbDmgMaxHP,n; what does this item bonus script do i dont get what does it mean on item_bonus.txt all i can understand is when damage is morethan the let say 10% of max damage the 10% of it will be absorb i dunno thnx for the help
-
Stolao's Script Collection [Update 2018-06-02_08:16]
AinsLord replied to Stolao's topic in Script Collections
Please Fix Mining Link may i ask does your PVP ladder script is now working fine?? coz the last time i tried the room is always FULL https://github.com/Stolao/Npc_Release/tree/master/PvP_Ladder -
rebirth top 50 not showing any IGN help please i have the script that has a ladder here it is prontera,141,179,5 script Rebirth System 531,{ function checkItem; // check if player have all item required function colorItemrequired; // color the text. Red : not enough item, green otherwise function deleteItem; // delete all items required function displayItemneed; // display all items need at start function getItemReward; // give the items reward //function weightreq; // check if your current weight is highter than weight high novice .@eac = eaclass(); if ( num_rebirth == .reset_max ) { mes "You can only rebirth x"+ .reset_max +"."; emotion e_gasp; close; } else if( BaseLevel < 255 || JobLevel < 120 || ( !( .@eac&EAJL_2 ) || !Upper ) && ( Class != Job_Ninja && Class != Job_Gunslinger && Class != Job_Soul_Linker && Class != Job_Star_Gladiator) ) { mes "You must be rebirth max level/max job level."; close; } mes "Items need :"; displayItemneed(); next; switch( select( "^777777~ Rebirth", "~ Informations", "~ Rebirth ranking", "~ Good bye^000000" ) ) { case 1: checkItem(); deleteItem(); break; case 2: mes "You can only rebirth ^ff0000x"+ .reset_max +"^000000. You already rebirth ^ff0000x"+ num_rebirth +"^000000."; mes "Each rebirth you get ^ff0000"+ .num_status +"^000000 status points and after ^ff0000"+ .change_reward +"^000000 rebirth, you get only some items."; close; case 4: mes "Bye."; close; case 3: mes "TOP 50 of rebirth."; mes "Name - Number of rebirth"; .@size = query_sql( "select `name`, `num_rebirth` from `rebirth_system` order by `num_rebirth` desc limit 50", .@name$, .@value ); if( .@size ) { for( .@i = 0; .@i < .@size; .@i++ ) mes "^777777"+ ( .@i +1 ) +"^000000 : "+ .@name$[.@i] +" : ^FF0000"+ .@value[.@i] +"^000000"; } else mes "^0000ff* the list is empty *^000000"; close; } num_rebirth += 1; if ( Upper ) { // just in case the user change the setting... lastJob = roclass( .@eac&EAJ_UPPERMASK ); jobchange Job_Novice_High; } else jobchange Job_Novice; resetlvl 1; if ( num_rebirth < .change_reward ) { if ( Class == Job_Novice ) StatusPoint = 48; StatusPoint = StatusPoint + .num_status * num_rebirth; } else { StatusPoint = StatusPoint + .num_status * .change_reward; getItemReward(); query_sql "insert into `rebirth_system` ( `account_id`, `name`, `num_rebirth`, `last_ip` ) select "+ getcharid(3) +", '"+ escape_sql( strcharinfo(0) ) +"', '"+ num_rebirth +"',`login`.`last_ip` from `login` where `login`.`account_id` = "+ getcharid(3) +" on duplicate key update `rebirth_system`.`num_rebirth` = `rebirth_system`.`num_rebirth` +1"; announce "[ Rebirth system ] : "+ strcharinfo(0) +" Successfully Rebirth!", 0; close; } function checkItem { for ( ; .@i < .size_item; .@i += 2 ) if ( countitem( .item_req[.@i] ) < .item_req[ .@i+1 ] + num_rebirth ) { mes "You don't have enought "+ getitemname( .item_req[.@i] ) +". ^ff0000["+ countitem( .item_req[.@i] ) +"/"+ ( .item_req[ .@i+1 ] + num_rebirth ) +"]^000000"; close; } if ( num_rebirth >= .change_reward ) if ( .add_item_req[1] + num_rebirth - .change_reward > countitem( .add_item_req[0] ) ) { mes "You don't have enought "+ getitemname( .add_item_req[0] ) +". ^ff0000["+ countitem( .add_item_req[0] ) +"/"+ ( .add_item_req[1] + num_rebirth - .change_reward ) +"]^000000"; close; } return; } function colorItemrequired { if ( countitem( .item_req[ getarg(0) ] ) < .item_req[ getarg(0)+1 ] + num_rebirth ) return "^ff0000"; return "^00ff00"; } function deleteItem { for ( ; .@i < .size_item; .@i += 2 ) delitem .item_req[.@i], ( .item_req[ .@i+1 ] + num_rebirth ); if ( num_rebirth >= .change_reward ) delitem .add_item_req[0], ( .add_item_req[1] + num_rebirth - .change_reward ); return; } function displayItemneed { for ( ; .@i < .size_item; .@i += 2 ) mes colorItemrequired( .@i ) +" - x"+ ( .item_req[ .@i+1 ] + num_rebirth ) +" "+ getitemname( .item_req[.@i] ); if ( num_rebirth >= .change_reward ) { if ( .add_item_req[1] + num_rebirth - .change_reward > countitem( .add_item_req[0] ) ) .@color$ = "^ff0000"; else .@color$ = "^00ff00"; mes .@color$ +"- x"+ ( .add_item_req[1] + ( num_rebirth - .change_reward ) ) +" "+ getitemname( .add_item_req[0] ); } return; } function getItemReward { for ( ; .@i < .size_reward; .@i += 2 ) getitem .reward[.@i], .reward[ .@i+1 ]; return; } function weightreq { if ( Weight > 20000 ) { mes "You have too much items on you. Your weight will be too high after rebirth."; close; } return; } OnInit: .reset_max = 200; // how much reset max .change_reward = 150; // after 30 rebirth, change reward .num_status = 10; // + X number of status points // item required <item ID>, <number> setarray .item_req, 7179, 50, 7227, 50, 969, 300; .size_item = getarraysize( .item_req ); // additionnal items after rebirth >> .change_reward // <item ID>, <number> setarray .add_item_req, 7179, 100; // rewards <item ID>, <number> setarray .reward, 674, 50; .size_reward = getarraysize( .reward ); end; } the problem here is it doesnt save on the SQL.. NEXT i have here that doesnt have rebirth ladder here it is prontera,141,179,5 script Rebirth System 531,{ function checkItem; // check if player have all item required function colorItemrequired; // color the text. Red : not enough item, green otherwise function deleteItem; // delete all items required function displayItemneed; // display all items need at start function getItemReward; // give the items reward //function weightreq; // check if your current weight is highter than weight high novice .@eac = eaclass(); if ( num_rebirth == .reset_max ) { mes "You can only rebirth x"+ .reset_max +"."; emotion e_gasp; close; } else if( BaseLevel < 255 || JobLevel < 120 || ( !( .@eac&EAJL_2 ) || !Upper ) && ( Class != Job_Ninja && Class != Job_Gunslinger && Class != Job_Soul_Linker && Class != Job_Star_Gladiator) ) { mes "Your Base & Job Lv must be maximum before you rebirth."; close; } mes "Items need :"; displayItemneed(); next; switch( select( "^777777~ Rebirth", "~ Informations", "~ Good bye^000000" ) ) { case 1: //weightreq(); checkItem(); deleteItem(); break; case 2: mes "You can only rebirth ^ff0000x"+ .reset_max +"^000000. You already have ^ff0000x"+ num_rebirth +"^000000 Rebirth."; mes "Each rebirth you get ^ff0000"+ .num_status +"^000000 Stat Points and after ^ff0000"+ .change_reward +"^000000 rebirth, you can receive Random as a reward!"; close; case 3: mes "Bye."; close; } num_rebirth += 1; if ( Upper ) { // just in case the user change the setting... lastJob = roclass( .@eac&EAJ_UPPERMASK ); jobchange Job_Novice_High; } else jobchange Job_Novice; resetlvl 1; if ( num_rebirth < .change_reward ) StatusPoint = StatusPoint + .num_status * num_rebirth; else { StatusPoint = StatusPoint + .num_status * .change_reward; getItemReward(); } query_sql "insert into `rebirth_system` values ( "+ getcharid(3) +", '"+ escape_sql( strcharinfo(0) ) +"', '"+ num_rebirth +"', '"+ getcharip() +"' ) on duplicate key update `num_rebirth` = `num_rebirth` +1"; announce " "+ strcharinfo(0) +" has been Reborn "+ num_rebirth +" Times!", 0; set ClassHelper,0; close; function checkItem { for ( ; .@i < .size_item; .@i += 2 ) if ( countitem( .item_req[.@i] ) < .item_req[ .@i+1 ] + num_rebirth ) { mes "You don't have enought "+ getitemname( .item_req[.@i] ) +". ^ff0000["+ countitem( .item_req[.@i] ) +"/"+ ( .item_req[ .@i+1 ] + num_rebirth ) +"]^000000"; close; } if ( num_rebirth >= .change_reward ) if ( .add_item_req[1] + num_rebirth - .change_reward > countitem( .add_item_req[0] ) ) { mes "You don't have enought "+ getitemname( .add_item_req[0] ) +". ^ff0000["+ countitem( .add_item_req[0] ) +"/"+ ( .add_item_req[1] + num_rebirth - .change_reward ) +"]^000000"; close; } return; } function colorItemrequired { if ( countitem( .item_req[ getarg(0) ] ) < .item_req[ getarg(0)+1 ] + num_rebirth ) return "^ff0000"; return "^00ff00"; } function deleteItem { for ( ; .@i < .size_item; .@i += 2 ) delitem .item_req[.@i], ( .item_req[ .@i+1 ] + num_rebirth ); if ( num_rebirth >= .change_reward ) delitem .add_item_req[0], ( .add_item_req[1] + num_rebirth - .change_reward ); return; } function displayItemneed { for ( ; .@i < .size_item; .@i += 2 ) mes colorItemrequired( .@i ) +" - x"+ ( .item_req[ .@i+1 ] + num_rebirth ) +" "+ getitemname( .item_req[.@i] ); if ( num_rebirth >= .change_reward ) { if ( .add_item_req[1] + num_rebirth - .change_reward > countitem( .add_item_req[0] ) ) .@color$ = "^ff0000"; else .@color$ = "^00ff00"; mes .@color$ +"- x"+ ( .add_item_req[1] + ( num_rebirth - .change_reward ) ) +" "+ getitemname( .add_item_req[0] ); } return; } function getItemReward { for ( ; .@i < .size_reward; .@i += 2 ) getitem .reward[.@i], .reward[ .@i+1 ]; return; } function weightreq { if ( Weight > 35000 ) { mes "You have too much items on you. Your weight will be too high after rebirth."; close; } return; } OnInit: .reset_max = 200; // how much reset max .change_reward = 150; // after 30 rebirth, change reward .num_status = 10; // + X number of status points // item required <item ID>, <number> setarray .item_req, 7179, 5, 7227, 5, 969, 3; .size_item = getarraysize( .item_req ); // additionnal items after rebirth >> .change_reward // <item ID>, <number> setarray .add_item_req, 674, 3; //end; //OnClock0939: //OnClock1200: //enablenpc strnpcinfo(3); //announce "The rebirth npc appear!", 0; //end; //OnClock0945: //OnClock1210: //disablenpc strnpcinfo(3); //announce "The rebirth npc is gone!", 0; end; } the problem here instead of per player who rebirth will be saved on the SQL its per account ID and the thing is the 1st character who made a rebirth will be listed EX: Test1 has 100 reset then create new char same accnt and try to do a rebirth, then Test2 Rebirth will be added to Test1 instead of having 2 character listed on SQL can anyone help me with this im trying to change every part of it but still have the same output THNX IN ADVANCE CALLING @Capuche this is a great script u had please help us
-
Rebirth system script problem || Always ask to be max lvl/jlvl
AinsLord replied to AinsLord's question in Scripting Support
how can i make it available for ninja/gunslinger/Starglad/soul linker?? - SOLVED EDIT: got this error after rebirth i already import the sql file of the script - SOLVED DB error - Unknown column 'num_rebirth4' in 'field list' now when i reach this no stat points is added my max reset is 15 .change_reward = 10; // after 10 rebirth, change reward can you help me fix this?? another one how can i reset the rankings i tried to delete info on the rebirth table still when i interact with the NPC says im still have like 20 rebirths??? and now it seems it doesnt record it on the sql here my full code script prontera,141,179,5 script Rebirth System 531,{ function checkItem; // check if player have all item required function colorItemrequired; // color the text. Red : not enough item, green otherwise function deleteItem; // delete all items required function displayItemneed; // display all items need at start function getItemReward; // give the items reward //function weightreq; // check if your current weight is highter than weight high novice .@eac = eaclass(); if ( num_rebirth == .reset_max ) { mes "You can only rebirth x"+ .reset_max +"."; emotion e_gasp; close; } else if( BaseLevel < 255 || JobLevel < 120 || ( !( .@eac&EAJL_2 ) || !Upper ) && ( Class != Job_Ninja && Class != Job_Gunslinger && Class != Job_Soul_Linker && Class != Job_Star_Gladiator) ) { mes "You must be rebirth max level/max job level."; close; } mes "Items need :"; displayItemneed(); next; switch( select( "^777777~ Rebirth", "~ Informations", "~ Rebirth ranking", "~ Good bye^000000" ) ) { case 1: checkItem(); deleteItem(); break; case 2: mes "You can only rebirth ^ff0000x"+ .reset_max +"^000000. You already rebirth ^ff0000x"+ num_rebirth +"^000000."; mes "Each rebirth you get ^ff0000"+ .num_status +"^000000 status points and after ^ff0000"+ .change_reward +"^000000 rebirth, you get only some items."; close; case 4: mes "Bye."; close; case 3: mes "TOP 50 of rebirth."; mes "Name - Number of rebirth"; .@size = query_sql( "select `name`, `num_rebirth` from `rebirth_system` order by `num_rebirth` desc limit 50", .@name$, .@value ); if( .@size ) { for( .@i = 0; .@i < .@size; .@i++ ) mes "^777777"+ ( .@i +1 ) +"^000000 : "+ .@name$[.@i] +" : ^FF0000"+ .@value[.@i] +"^000000"; } else mes "^0000ff* the list is empty *^000000"; close; } num_rebirth += 1; if ( Upper ) { // just in case the user change the setting... lastJob = roclass( .@eac&EAJ_UPPERMASK ); jobchange Job_Novice_High; } else jobchange Job_Novice; resetlvl 1; if ( num_rebirth < .change_reward ) { // And it seems if i change this to "num_rebirth >= .change_reward" it records it on the sql if ( Class == Job_Novice ) StatusPoint = 48; StatusPoint = StatusPoint + .num_status * num_rebirth; } else { StatusPoint = StatusPoint + .num_status * .change_reward; getItemReward(); query_sql "insert into `rebirth_system` ( `account_id`, `name`, `num_rebirth`, `last_ip` ) select "+ getcharid(3) +", '"+ escape_sql( strcharinfo(0) ) +"', '"+ num_rebirth +"',`login`.`last_ip` from `login` where `login`.`account_id` = "+ getcharid(3) +" on duplicate key update `rebirth_system`.`num_rebirth` = `rebirth_system`.`num_rebirth` +1"; announce "[ Rebirth system ] : "+ strcharinfo(0) +" Successfully Rebirth!", 0; close; } function checkItem { for ( ; .@i < .size_item; .@i += 2 ) if ( countitem( .item_req[.@i] ) < .item_req[ .@i+1 ] + num_rebirth ) { mes "You don't have enought "+ getitemname( .item_req[.@i] ) +". ^ff0000["+ countitem( .item_req[.@i] ) +"/"+ ( .item_req[ .@i+1 ] + num_rebirth ) +"]^000000"; close; } if ( num_rebirth >= .change_reward ) if ( .add_item_req[1] + num_rebirth - .change_reward > countitem( .add_item_req[0] ) ) { mes "You don't have enought "+ getitemname( .add_item_req[0] ) +". ^ff0000["+ countitem( .add_item_req[0] ) +"/"+ ( .add_item_req[1] + num_rebirth - .change_reward ) +"]^000000"; close; } return; } function colorItemrequired { if ( countitem( .item_req[ getarg(0) ] ) < .item_req[ getarg(0)+1 ] + num_rebirth ) return "^ff0000"; return "^00ff00"; } function deleteItem { for ( ; .@i < .size_item; .@i += 2 ) delitem .item_req[.@i], ( .item_req[ .@i+1 ] + num_rebirth ); if ( num_rebirth >= .change_reward ) delitem .add_item_req[0], ( .add_item_req[1] + num_rebirth - .change_reward ); return; } function displayItemneed { for ( ; .@i < .size_item; .@i += 2 ) mes colorItemrequired( .@i ) +" - x"+ ( .item_req[ .@i+1 ] + num_rebirth ) +" "+ getitemname( .item_req[.@i] ); if ( num_rebirth >= .change_reward ) { if ( .add_item_req[1] + num_rebirth - .change_reward > countitem( .add_item_req[0] ) ) .@color$ = "^ff0000"; else .@color$ = "^00ff00"; mes .@color$ +"- x"+ ( .add_item_req[1] + ( num_rebirth - .change_reward ) ) +" "+ getitemname( .add_item_req[0] ); } return; } function getItemReward { for ( ; .@i < .size_reward; .@i += 2 ) getitem .reward[.@i], .reward[ .@i+1 ]; return; } function weightreq { if ( Weight > 20000 ) { mes "You have too much items on you. Your weight will be too high after rebirth."; close; } return; } OnInit: .reset_max = 200; // how much reset max .change_reward = 150; // after 30 rebirth, change reward .num_status = 10; // + X number of status points // item required <item ID>, <number> setarray .item_req, 7179, 50, 7227, 50, 969, 300; .size_item = getarraysize( .item_req ); // additionnal items after rebirth >> .change_reward // <item ID>, <number> setarray .add_item_req, 7179, 100; // rewards <item ID>, <number> setarray .reward, 674, 50; .size_reward = getarraysize( .reward ); end; } if ( num_rebirth < .change_reward ) { // And it seems if i change this to "num_rebirth >= .change_reward" it records it on the sql and i have this one it record on sql but i tried to create new char same account it goes to the 1st char that did reset 1st like test1 resets 100 then i created test2, test2 resets goes to test1 so that makes 101 reset for test1 heres the script prontera,141,179,5 script Rebirth System 531,{ function checkItem; // check if player have all item required function colorItemrequired; // color the text. Red : not enough item, green otherwise function deleteItem; // delete all items required function displayItemneed; // display all items need at start function getItemReward; // give the items reward //function weightreq; // check if your current weight is highter than weight high novice .@eac = eaclass(); if ( num_rebirth == .reset_max ) { mes "You can only rebirth x"+ .reset_max +"."; emotion e_gasp; close; } else if( BaseLevel < 255 || JobLevel < 120 || ( !( .@eac&EAJL_2 ) || !Upper ) && ( Class != Job_Ninja && Class != Job_Gunslinger && Class != Job_Soul_Linker && Class != Job_Star_Gladiator) ) { mes "You must be rebirth max level/max job level."; close; } mes "Items need :"; displayItemneed(); next; switch( select( "^777777~ Rebirth", "~ Informations", "~ Rebirth ranking", "~ Good bye^000000" ) ) { case 1: checkItem(); deleteItem(); break; case 2: mes "You can only rebirth ^ff0000x"+ .reset_max +"^000000. You already rebirth ^ff0000x"+ num_rebirth +"^000000."; mes "Each rebirth you get ^ff0000"+ .num_status +"^000000 status points and after ^ff0000"+ .change_reward +"^000000 rebirth, you get only some items."; close; case 3: mes "Bye."; case 4: mes "TOP 50 of rebirth."; mes "Name - Number of rebirth"; .@size = query_sql( "select `name`, `num_rebirth` from `rebirth_system` order by `num_rebirth` desc limit 50", .@name$, .@value ); if( .@size ) { for( .@i = 0; .@i < .@size; .@i++ ) mes "^777777"+ ( .@i +1 ) +"^000000 : "+ .@name$[.@i] +" : ^FF0000"+ .@value[.@i] +"^000000"; } else mes "^0000ff* the list is empty *^000000"; close; } num_rebirth += 1; if ( Upper ) { // just in case the user change the setting... lastJob = roclass( .@eac&EAJ_UPPERMASK ); jobchange Job_Novice_High; } else jobchange Job_Novice; resetlvl 1; if ( num_rebirth < .change_reward ) StatusPoint = StatusPoint + .num_status * num_rebirth; else getItemReward(); query_sql "insert into `rebirth_system` ( `account_id`, `name`, `num_rebirth`, `last_ip` ) select "+ getcharid(3) +", '"+ escape_sql( strcharinfo(0) ) +"', '"+ num_rebirth +"',`login`.`last_ip` from `login` where `login`.`account_id` = "+ getcharid(3) +" on duplicate key update `rebirth_system`.`num_rebirth` = `rebirth_system`.`num_rebirth` +1"; announce "[ Rebirth system ] : "+ strcharinfo(0) +" rebirth for the "+ num_rebirth +" time !", 0; close; function checkItem { for ( ; .@i < .size_item; .@i += 2 ) if ( countitem( .item_req[.@i] ) < .item_req[ .@i+1 ] + num_rebirth ) { mes "You don't have enought "+ getitemname( .item_req[.@i] ) +". ^ff0000["+ countitem( .item_req[.@i] ) +"/"+ ( .item_req[ .@i+1 ] + num_rebirth ) +"]^000000"; close; } if ( num_rebirth >= .change_reward ) if ( .add_item_req[1] + num_rebirth - .change_reward > countitem( .add_item_req[0] ) ) { mes "You don't have enought "+ getitemname( .add_item_req[0] ) +". ^ff0000["+ countitem( .add_item_req[0] ) +"/"+ ( .add_item_req[1] + num_rebirth - .change_reward ) +"]^000000"; close; } return; } function colorItemrequired { if ( countitem( .item_req[ getarg(0) ] ) < .item_req[ getarg(0)+1 ] + num_rebirth ) return "^ff0000"; return "^00ff00"; } function deleteItem { for ( ; .@i < .size_item; .@i += 2 ) delitem .item_req[.@i], ( .item_req[ .@i+1 ] + num_rebirth ); if ( num_rebirth >= .change_reward ) delitem .add_item_req[0], ( .add_item_req[1] + num_rebirth - .change_reward ); return; } function displayItemneed { for ( ; .@i < .size_item; .@i += 2 ) mes colorItemrequired( .@i ) +" - x"+ ( .item_req[ .@i+1 ] + num_rebirth ) +" "+ getitemname( .item_req[.@i] ); if ( num_rebirth >= .change_reward ) { if ( .add_item_req[1] + num_rebirth - .change_reward > countitem( .add_item_req[0] ) ) .@color$ = "^ff0000"; else .@color$ = "^00ff00"; mes .@color$ +"- x"+ ( .add_item_req[1] + ( num_rebirth - .change_reward ) ) +" "+ getitemname( .add_item_req[0] ); } return; } function getItemReward { for ( ; .@i < .size_reward; .@i += 2 ) getitem .reward[.@i], .reward[ .@i+1 ]; return; } function weightreq { if ( Weight > 20000 ) { mes "You have too much items on you. Your weight will be too high after rebirth."; close; } return; } OnInit: .reset_max = 200; // how much reset max .change_reward = 150; // after 30 rebirth, change reward .num_status = 10; // + X number of status points // item required <item ID>, <number> setarray .item_req, 7179, 5, 7227, 2, 969, 3; .size_item = getarraysize( .item_req ); // additionnal items after rebirth >> .change_reward // <item ID>, <number> setarray .add_item_req, 601, 1; // rewards <item ID>, <number> setarray .reward, 504, 1; .size_reward = getarraysize( .reward ); end; } Tnx in advance @Emistry -
Rebirth system script problem || Always ask to be max lvl/jlvl
AinsLord posted a question in Scripting Support
here's the script i found here i think its from @Capuche prontera,164,174,5 script Rebirth System 833,{ function checkItem; // check if player have all item required function colorItemrequired; // color the text. Red : not enough item, green otherwise function deleteItem; // delete all items required function displayItemneed; // display all items need at start function getItemReward; // give the items reward //function weightreq; // check if your current weight is highter than weight high novice .@eac = eaclass(); if ( num_rebirth4 == .reset_max ) { mes "You can only rebirth x"+ .reset_max +"."; emotion e_gasp; close; } else if( NextJobExp || NextBaseExp || !( .@eac&EAJL_2 ) || !Upper ) { mes "You must be rebirth max level/max job level."; close; } mes "Items need :"; displayItemneed(); next; switch( select( "^777777~ Rebirth", "~ Informations", "~ Rebirth ranking", "~ Good bye^000000" ) ) { case 1: checkItem(); deleteItem(); break; case 2: mes "You can only rebirth ^ff0000x"+ .reset_max +"^000000. You already rebirth ^ff0000x"+ num_rebirth4 +"^000000."; mes "Each rebirth you get ^ff0000"+ .num_status +"^000000 status points and after ^ff0000"+ .change_reward +"^000000 rebirth, you get only some items."; close; case 4: mes "Bye."; close; case 3: mes "TOP 50 of rebirth."; mes "Name - Number of rebirth"; .@size = query_sql( "select `name`, `num_rebirth4` from `rebirth_system` order by `num_rebirth4` desc limit 50", .@name$, .@value ); if( .@size ) { for( .@i = 0; .@i < .@size; .@i++ ) mes "^777777"+ ( .@i +1 ) +"^000000 : "+ .@name$[.@i] +" : ^FF0000"+ .@value[.@i] +"^000000"; } else mes "^0000ff* the list is empty *^000000"; close; } num_rebirth4 += 1; if ( Upper ) { // just in case the user change the setting... lastJob = roclass( .@eac&EAJ_UPPERMASK ); jobchange Job_Novice_High; } else jobchange Job_Novice; resetlvl 1; if ( num_rebirth < 30 ) StatusPoint = StatusPoint + .num_status * num_rebirth; else getItemReward(); query_sql "insert into `rebirth_system` values ( "+ getcharid(3) +", '"+ escape_sql( strcharinfo(0) ) +"', '"+ num_rebirth4 +"', '"+ getcharip() +"' ) on duplicate key update `num_rebirth4` = `num_rebirth4` +1"; announce "[ Rebirth system ] : "+ strcharinfo(0) +" Successfully Rebirth!", 0; close; function checkItem { for ( ; .@i < .size_item; .@i += 2 ) if ( countitem( .item_req[.@i] ) < .item_req[ .@i+1 ] + num_rebirth4 ) { mes "You don't have enought "+ getitemname( .item_req[.@i] ) +". ^ff0000["+ countitem( .item_req[.@i] ) +"/"+ ( .item_req[ .@i+1 ] + num_rebirth4 ) +"]^000000"; close; } if ( num_rebirth4 >= .change_reward ) if ( .add_item_req[1] + num_rebirth4 - .change_reward > countitem( .add_item_req[0] ) ) { mes "You don't have enought "+ getitemname( .add_item_req[0] ) +". ^ff0000["+ countitem( .add_item_req[0] ) +"/"+ ( .add_item_req[1] + num_rebirth4 - .change_reward ) +"]^000000"; close; } return; } function colorItemrequired { if ( countitem( .item_req[ getarg(0) ] ) < .item_req[ getarg(0)+1 ] + num_rebirth4 ) return "^ff0000"; return "^00ff00"; } function deleteItem { for ( ; .@i < .size_item; .@i += 2 ) delitem .item_req[.@i], ( .item_req[ .@i+1 ] + num_rebirth4 ); if ( num_rebirth4 >= .change_reward ) delitem .add_item_req[0], ( .add_item_req[1] + num_rebirth4 - .change_reward ); return; } function displayItemneed { for ( ; .@i < .size_item; .@i += 2 ) mes colorItemrequired( .@i ) +" - x"+ ( .item_req[ .@i+1 ] + num_rebirth4 ) +" "+ getitemname( .item_req[.@i] ); if ( num_rebirth4 >= .change_reward ) { if ( .add_item_req[1] + num_rebirth4 - .change_reward > countitem( .add_item_req[0] ) ) .@color$ = "^ff0000"; else .@color$ = "^00ff00"; mes .@color$ +"- x"+ ( .add_item_req[1] + ( num_rebirth4 - .change_reward ) ) +" "+ getitemname( .add_item_req[0] ); } return; } function getItemReward { for ( ; .@i < .size_reward; .@i += 2 ) getitem .reward[.@i], .reward[ .@i+1 ]; return; } function weightreq { if ( Weight > 20000 ) { mes "You have too much items on you. Your weight will be too high after rebirth."; close; } return; } OnInit: .reset_max = 17; // how much reset max .change_reward = 15; // after 30 rebirth, change reward .num_status = 500; // + X number of status points // item required <item ID>, <number> setarray .item_req, 7179, 50, 20234, 50, 969, 300; .size_item = getarraysize( .item_req ); // additionnal items after rebirth >> .change_reward // <item ID>, <number> setarray .add_item_req, 7179, 100; // rewards <item ID>, <number> setarray .reward, 20234, 50; .size_reward = getarraysize( .reward ); end; } it keeps on saying you must be rebirth max lvl/max job lvl my char is 255/120 its maxed already whats wrong anyone can help me please