Jump to content

randell1993

Members
  • Posts

    76
  • Joined

  • Last visited

1 Follower

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

3948 profile views

randell1993's Achievements

Drops

Drops (2/15)

  • Conversation Starter
  • Dedicated
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

4

Reputation

3

Community Answers

  1. callfunc ("Time2Str",vip_status(2)) use this on the time left part
  2. Use this: this is the port 3000 https://gist.github.com/anildigital/911289
  3. script_commands.txt *getitem2 <item id>,<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>{,<account ID>}; *getitem2 "<item name>",<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>{,<account ID>}; *getitem3 <item id>,<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>,<RandomIDArray>,<RandomValueArray>,<RandomParamArray>{,<account ID>}; *getitem3 "<item name>",<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>,<RandomIDArray>,<RandomValueArray>,<RandomParamArray>{,<account ID>}; This command will give an amount of specified items to the invoking character. If an optional account ID is specified, and the target character is currently online, items will be created in their inventory instead. If they are not online, nothing will happen. It works essentially the same as 'getitem' but is a lot more flexible. Those parameters that are different from 'getitem' are: identify - Whether you want the item to be identified (1) or not (0). refine - For how many pluses will it be refined. It will not let you refine an item higher than the max refine. attribute - Whether the item is broken (1) or not (0). card1,2,3,4 - If you want a card compound to it, place the card ID number into the specific card slot. Card1-card4 values are also used to store name information for named items, as well as the elemental property of weapons and armor. You can create a named item in this manner, however, if you just need a named piece of standard equipment, it is much easier to the 'getnameditem' function instead. You will need to keep these values if you want to destroy and then perfectly recreate a named item, for this see 'getinventorylist'. If you still want to try creating a named item with this command because 'getnameditem' won't do it for you cause it's too limited, you can do it like this. Careful, minor magic ahead. // First, let's get an ID of a character who's name will be on the item. // Only an existing character's name may be there. // Let's assume our character is 'Adam' and find his ID. @charid = getcharid(0,"Adam"); // Now we split the character ID number into two portions with a binary // shift operation. If you don't understand what this does, just copy it. @card3 = @charid & 65535; @card4 = @charid >> 16; // If you're inscribing non-equipment, @card1 must be 254. // Arrows are also not equipment. @card1 = 254; // For named equipment, card2 means the Star Crumbs and elemental // crystals used to make this equipment. For everything else, it's 0. @card2 = 0; // Now, let's give the character who invoked the script some // Adam's Apples: getitem2 512,1,1,0,0,@card1,@card2,@card3,@card4; This wasn't tested with all possible items, so I can't give any promises, experiment first before relying on it. To create equipment, continue this example it like this: // We've already have card3 and card4 loaded with correct // values so we'll just set up card1 and card2 with data // for an Ice Stiletto. // If you're inscribing equipment, @card1 must be 255. @card1 = 255; // That's the number of star crumbs in a weapon. @sc = 2; // That's the number of elemental property of the weapon. @ele = 1; // And that's the wacky formula that makes them into // a single number. @card2 = @ele+((@sc*5)<<8); // That will make us an Adam's +2 VVS Ice Stiletto: getitem2 1216,1,1,2,0,@card1,@card2,@card3,@card4; Experiment with the number of star crumbs - I'm not certain just how much will work most and what it depends on. The valid element numbers are: 1 - Ice, 2 - Earth 3 - Fire 4 - Wind. You can, apparently, even create duplicates of the same pet egg with this command, creating a pet which is the same, but simultaneously exists in two eggs, and may hatch from either, although, I'm not sure what kind of a mess will this really cause. 'getitem3' is advance version of 'getitem2' that also use Item Random Option as additional values. <RandomIDArray> : Array variable of ID for item random option, see db/[pre-]re/item_randomopt_db.txt <RandomValueArray> : Array variable of item random option's value. <RandomParamArray> : Array variable of item random option's param. Example to get Crimson Weapon with Ghost property: // +9 Crimson Dagger [2] setarray .@OptID[0],RDMOPT_WEAPON_ATTR_TELEKINESIS; setarray .@OptVal[0],0; setarray .@OptParam[0],0; getitem3 28705,1,1,9,0,0,0,0,0,.@OptID,.@OptVal,.@OptParam; Use getitem3 to have random option applied to your custom item Values for the random option are found on the following text file: item_randomopt_group.txt and item_randomopt_db.txt For cashshop you can just create a custom box that calls to a function that will then use the command you have from above eg. in item db add this to the custom box {callfunc "F_CASH_SHOP_RANDOM"; } and create a script function script F_CASH_SHOP_RANDOM { getitem3 <item id>,<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>,<RandomIDArray>,<RandomValueArray>,<RandomParamArray>{,<account ID>}; end; }
  4. It does work you just need to embed it on the html page Thor patcher calls for internet explorer its either you have your IE configured not to load embedded facebook app or you have a very old IE
  5. This line of code checks the following tables schema_config.char_db, schema_config.hotkey_db, schema_config.scdata_db, schema_config.cart_db, schema_config.inventory_db, schema_config.charlog_db, schema_config.char_reg_str_table, schema_config.char_reg_num_table, schema_config.acc_reg_str_table, schema_config.acc_reg_num_table, schema_config.skill_db, schema_config.interlog_db, schema_config.memo_db, schema_config.guild_db, schema_config.guild_alliance_db, schema_config.guild_castle_db, schema_config.guild_expulsion_db, schema_config.guild_member_db, schema_config.guild_skill_db, schema_config.guild_position_db, schema_config.guild_storage_db, schema_config.party_db, schema_config.pet_db, schema_config.friend_db, schema_config.mail_db, schema_config.auction_db, schema_config.quest_db, schema_config.homunculus_db, schema_config.skill_homunculus_db, schema_config.mercenary_db, schema_config.mercenary_owner_db, schema_config.elemental_db, schema_config.ragsrvinfo_db, schema_config.skillcooldown_db, schema_config.bonus_script_db, schema_config.clan_table, schema_config.clan_alliance_table, schema_config.mail_attachment_db, schema_config.achievement_table so its either you have corrupted main.sql in which case you should try to redownload the whole server since there might be some files which are corrupted too. or you haven't properly added the main.sql in your sql database
  6. #ifdef RENEWAL // forced to neutral skills [helvetica] // skills forced to neutral gain benefits from weapon element // but final damage is considered "neutral" and resistances are applied again switch (skill_id) { case MC_CARTREVOLUTION: case MO_INVESTIGATE: case CR_ACIDDEMONSTRATION: case SR_GATEOFHELL: case GN_FIRE_EXPANSION_ACID: case KO_BAKURETSU: // Forced to neutral element wd.damage = battle_attr_fix(src, target, wd.damage, ELE_NEUTRAL, tstatus->def_ele, tstatus->ele_lv); break; case CR_SHIELDBOOMERANG: case LK_SPIRALPIERCE: case ML_SPIRALPIERCE: case PA_SHIELDCHAIN: case PA_SACRIFICE: case RK_DRAGONBREATH: case RK_DRAGONBREATH_WATER: case NC_SELFDESTRUCTION: case KO_HAPPOKUNAI: { int64 tmp = wd.damage; battle.c as you can see here acid demonstration is forced to neutral element but see the comments
  7. Don't think so as in the documentation *switch (expression); The switch statement is similar to a series of if statements on the same expression. In many occasions, you may want to compare the same variable (or expression) with many different values, and execute a different piece of code depending on which value it equals to. This is exactly what the switch statement is for. It is important to understand how the switch statement is executed in order to avoid mistakes. The switch statement executes line by line (actually, statement by statement). In the beginning, no code is executed. Only when a case statement is found with a value that matches the value of the switch expression the case statement(s) will to executed. The parser continues to execute the statements until the end of the switch block, or the first time it sees a break statement. If you don't write a break statement at the end of a case's statement list, the parser will go on executing the statements of the following case (fall-through). Example 1: switch(select("Yes:No")) { case 1: mes "You said yes!"; break; case 2: mes "Aww, why?"; break; } close; The example above would work like a menu and would go to the first case if the user selects option, otherwise, would go to the second one. Example 2: switch(getgroupid()) { case 1: mes "Wow, you're super!"; break; case 2: mes "A helping hand!"; break; case 3: mes "10001010010011"; break; case 4: mes "Yes, milord?"; break; default: mes "Hello there!"; break; } The example above would print a message depending on the player's groupid. If there is no statement declared for the corresponding groupid, the script would use the 'default' statement that applies to rest of possible values, similar to 'else' in the if-else statement. I haven't read the source for this but just try it maybe it may work
  8. It does work though, Using latest rAthena git and 20151104 client trigger locations are found here /npc/re/other/achievements.txt
  9. Yup should be the only thing i can think off is that you disable packet encryption on your client because as default rathena has packet obsfuscation active. Just dont apply the disable packet encryuption when using Nemo
  10. Firstly rathena fully supports this client and no server side modifications need to be done before we edit the client date at mmo.h now this can be found at src/config/packet.h
  11. <?php /* FluxCP Vote For Points Developed By: JayPee Mateo Email: [email protected] */ //A login is required $this->loginRequired(); $site_id = $params->get('sid'); if(preg_match("/^[0-9]{1,}$/",$site_id)) { //Somewhat Prevent of using Proxy Servers $xforward= $_SERVER["HTTP_X_FORWARDED_FOR"]; if (!empty($xforward)) { $error = Flux::message('PROXY_NOT_ALLOWED'); } else { //User Account_ID and IP Address $account_id = $session->account->account_id; $ip_address = 0; if(Flux::config('IP_BLOCKING')) $ip_address = $_SERVER['REMOTE_ADDR']; $current_time= date("Y-m-d G:i:s",time()); //This will list the sites $vp_site = Flux::config('FluxTables.Sites'); $vp_voter = Flux::config('FluxTables.Voters'); $vp_logs = Flux::config('FluxTables.Logs'); $check = null; if($ip_address!=0) { /* IP BLOCKING SYSTEM IS ON/ENABLED This will check if the IP is unblocked for the specified site */ $sql = "SELECT `rtid`,`unblock_time`,`ip_address` FROM {$server->loginDatabase}.{$vp_logs} WHERE f_site_id=? AND unblock_time>? AND ip_address=? ORDER BY unblock_time ASC"; $sth = $server->connection->getStatement($sql); $sth->execute(array($site_id,$current_time,$ip_address)); $check = $sth->fetchAll(); } if(empty($check)) { $sql = "SELECT `address`,`points`,`blocking_time` FROM {$server->loginDatabase}.{$vp_site} WHERE site_id=? LIMIT 1"; $sth = $server->connection->getStatement($sql); $sth->execute(array($site_id)); $vp_site = $sth->fetch(); //Incase the user tamper the siteid if(!empty($vp_site)) { //Site Information $address = $vp_site->address; $blocking_time = $vp_site->blocking_time; $points = $vp_site->points; //Calculate the Unblocking Time $unblock_time = date("Y-m-d G:i:s",time()+$blocking_time); //Check if the User has an existing voter's Record //In Vote Logs $sql = "SELECT `rtid`,`ip_address`,`unblock_time` FROM {$server->loginDatabase}.{$vp_logs} WHERE account_id=? AND f_site_id=? "; $sth = $server->connection->getStatement($sql); $sth->execute(array($account_id,$site_id)); $check = $sth->fetch(); if(!empty($check)) $diff_time = strtotime($check->unblock_time)-strtotime(date("Y-m-d G:i:s",time())); else $diff_time = 0; if($diff_time<=0) { //Can Vote if(empty($check)){ //If Not Voters Record For the specific site make an Insertion $sql = "INSERT INTO {$server->loginDatabase}.{$vp_logs} (f_site_id,unblock_time,account_id,ip_address) VALUES(?,?,?,?)"; $sth = $server->connection->getStatement($sql); $sth->execute(array($site_id,$unblock_time,$account_id,$ip_address)); } else{ //If the voter has an existing log $sql = "UPDATE {$server->loginDatabase}.{$vp_logs} SET unblock_time=?, ip_address=? WHERE rtid=?"; $sth = $server->connection->getStatement($sql); $sth->execute(array($unblock_time,$ip_address,$check->rtid)); } //In Voters Records $sql = "SELECT `account_id`,`points` FROM {$server->loginDatabase}.{$vp_voter} WHERE account_id=?"; $sth = $server->connection->getStatement($sql); $sth->execute(array($account_id)); $check = $sth->fetch(); if(empty($check)){ //If Not Voters Record For the specific site make an Insertion $sql = "INSERT INTO {$server->loginDatabase}.{$vp_voter}(account_id,points) VALUES(?,?)"; $sth = $server->connection->getStatement($sql); $sth->execute(array($account_id,$points)); } else{ //If the voter is has an existing record $sql = "UPDATE {$server->loginDatabase}.{$vp_voter} SET points=? WHERE account_id=?"; $sth = $server->connection->getStatement($sql); $points = $vp_site->points+$check->points; $sth->execute(array($points,$account_id)); } $address = str_replace("http://","",$address); $address = str_replace("www.","",$address); $this->redirect("http://www.".$address); } else $error = Flux::message('BLOCK_VOTING_SITE').$check->unblock_time; } else $error = Flux::message('VOTING_SITE_NOT_FOUND'); }//--End else $error = Flux::message('BLOCK_VOTING_SITE').$check[0]->unblock_time; } } else $error = Flux::message('INVALID_VOTING_SITE'); ?> I don't know if this is the same but this will be easier to edit than editing the core modules which might affect updating the flux cp in future Here's what you need to change: First upon looking on cp_credits you find the following tables account_id balance last_donation_date last_donation_amount and on cp_v4p_voters i found in the download section are the following account_id points Now looking at this, we can see that there isn't much difference in how they are structured so it will be quite a bit easy to change on the script Now we look on the code above they access the cp_v4p_voters on this line $vp_voter = Flux::config('FluxTables.Voters'); we can then change values to $vp_voter = Flux::config('FluxTables.CreditsTable'); Now this will make the PHP script to look into the cp_credits table instead on cp_v4p_voters This time as you can see, the difference between the two tables is that the points value are inside the points column and now we need to change the script to place the variables inside the balance column. Those commands can be seen here in this part of the code //In Voters Records $sql = "SELECT `account_id`,`points` FROM {$server->loginDatabase}.{$vp_voter} WHERE account_id=?"; $sth = $server->connection->getStatement($sql); $sth->execute(array($account_id)); $check = $sth->fetch(); if(empty($check)){ //If Not Voters Record For the specific site make an Insertion $sql = "INSERT INTO {$server->loginDatabase}.{$vp_voter}(account_id,points) VALUES(?,?)"; $sth = $server->connection->getStatement($sql); $sth->execute(array($account_id,$points)); } else{ //If the voter is has an existing record $sql = "UPDATE {$server->loginDatabase}.{$vp_voter} SET points=? WHERE account_id=?"; $sth = $server->connection->getStatement($sql); $points = $vp_site->points+$check->points; $sth->execute(array($points,$account_id)); } In this you can see that on this line they access the cp_v4p_voters and selects account_id and points column $sql = "SELECT `account_id`,`points` FROM {$server->loginDatabase}.{$vp_voter} WHERE account_id=?"; And since we are now using the credits table which has the balance column instead of points we change this line into this. $sql = "SELECT `account_id`,`balance` FROM {$server->loginDatabase}.{$vp_voter} WHERE account_id=?"; heading to the other parts, on this chunk of lines we instruct the script to add the points everytime someone votes: if(empty($check)){ //If Not Voters Record For the specific site make an Insertion $sql = "INSERT INTO {$server->loginDatabase}.{$vp_voter}(account_id,points) VALUES(?,?)"; $sth = $server->connection->getStatement($sql); $sth->execute(array($account_id,$points)); } else{ //If the voter is has an existing record $sql = "UPDATE {$server->loginDatabase}.{$vp_voter} SET points=? WHERE account_id=?"; $sth = $server->connection->getStatement($sql); $points = $vp_site->points+$check->points; $sth->execute(array($points,$account_id)); } now we change the following lines to insert the points earned to balance column $sql = "INSERT INTO {$server->loginDatabase}.{$vp_voter}(account_id,points) VALUES(?,?)"; to $sql = "INSERT INTO {$server->loginDatabase}.{$vp_voter}(account_id,balance) VALUES(?,?)"; and this line $sql = "UPDATE {$server->loginDatabase}.{$vp_voter} SET points=? WHERE account_id=?"; to $sql = "UPDATE {$server->loginDatabase}.{$vp_voter} SET balance=? WHERE account_id=?"; I do hope this help you learn as just providing you with simple just replace this and that will just give you a hard time editing it in the future
  12. You can atleast link me to the vote point addons. Please do note that by going to 2nd option route you will need to change how your Points manager query SQL Database
  13. @Cianna Fernandez This is easy go to your vote for point php script, Edit the PHP so that every time they vote values are added on the table: cp_credits
  14. find this in quest_db.txt 12278,604800,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Towards Bakonawa Lake..." change the 604800seconds (1 week)
×
×
  • Create New...