Jump to content

Litro Endemic

Members
  • Posts

    252
  • Joined

  • Days Won

    8

Litro Endemic last won the day on July 7

Litro Endemic had the most liked content!

4 Followers

About Litro Endemic

  • Birthday 10/27/1991

Profile Information

Contact Methods

Recent Profile Visitors

2,824 profile views

Mood

  • Confused
  • Currently Feeling Confused

Litro Endemic's Achievements

  1. bl and src usually used as a variable of game object structure pointer (can be player, item, monster, npc, ...), take a function on status.cpp it have details information, on what param stand for, to initialize a blocklist depend on usage or function you want to reach your need. /** * Applies SC defense to a given status change * This function also determines whether or not the status change will be applied * @param src: Source of the status change [PC|MOB|HOM|MER|ELEM|NPC] * @param bl: Target of the status change * @param type: Status change (SC_*) * @param rate: Initial percentage rate of affecting bl (0~10000) * @param tick: Initial duration that the status change affects bl * @param flag: Value which determines what parts to calculate. See e_status_change_start_flags * @return adjusted duration based on flag values */ t_tick status_get_sc_def(struct block_list *src, struct block_list *bl, enum sc_type type, int rate, t_tick tick, unsigned char flag)
  2. isn't it you can just follow the example you give above, if you want it to work on gvg use mf_gvg, as for woe can use mf_gvg_castle for specific, or compare map name with g_cas like in woe controller script and for koe you need custom mapflag like mf_koe as condition and same other too, I can said this is strange question.
  3. try debuging the output of .teamname and .teamcid with debugmes, you can see where it gone wrong.
  4. id is unit game id not mob id, the check is correct, if target is monster, then convert it to mob_data then check the target mob id if that monster is emperium. if(target->type == BL_MOB) { struct mob_data *md = BL_CAST(BL_MOB, target); if (md->mob_id == MOBID_EMPERIUM) hp = 1; }
  5. element like fire, wind and water? if yes, there is no available script command for that, since element is script based not field member of item, you need to create indexes your self for it
  6. you can't use same type, for each bonus look at the db structure -- -- Table structure for table `bonus_script` -- CREATE TABLE IF NOT EXISTS `bonus_script` ( `char_id` INT(11) UNSIGNED NOT NULL, `script` TEXT NOT NULL, `tick` BIGINT(20) NOT NULL DEFAULT '0', `flag` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0', `type` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', `icon` SMALLINT(3) NOT NULL DEFAULT '-1', PRIMARY KEY (`char_id`, `type`) ) ENGINE=InnoDB; and script command of bonus_script *bonus_script "<script code>",<duration>{,<flag>{,<type>{,<status_icon>{,<char_id>}}}}; This command will attach a script to a player for a given duration, in seconds. After that time, the script will automatically expire. The same bonus cannot be stacked. By default, this bonus will be stored on `bonus_script` table when player logs out. Flags (bitmask): 1 : Remove when dead. 2 : Removable by Dispell. 4 : Removable by Clearance. 8 : Remove when player logs out. 16 : Removeable by Banishing Buster. 32 : Removable by Refresh. 64 : Removable by Lux Anima. 128 : Remove when Madogear is activated or deactivated. 256 : Remove when receive damage. 512 : Script is permanent, cannot be cleared by bonus_script_clear. 1024: Force to replace duplicated script by expanding the duration. 2048: Force to add duplicated script. This flag cannot be stacked with 1024, if both are defined, 1024 will be checked first and ignore this flag. Types: This will be used to decide negative or positive buff for 'debuff_on_logout'. 0: Ignore the buff type and won't be removed if the flag is not &8 (Default) 1: Buff 2: Debuff Status_icon: See "Status Icon" section in 'src/map/script_constants.hpp'. Default is SI_BLANK (-1). Example: // Apple gives you +5 Str bonus for 1 minute when it's consumed. 512,Apple,Apple,0,15,,20,,,,,0xFFFFFFFF,63,2,,,,,,{ bonus_script "{ bonus bStr,5; }",60; },{},{} this 2 script contain same type and then resulting duplicate entry, which was clear if you read in console (150003, 0) 150003 is that char id and 0 is the type. bonus_script "{ bonus bNoGemStone; bonus bUseSPrate,25; }",180,0,0,EFST_MVPCARD_MISTRESS; bonus_script "{ bonus bMaxHPrate,100; bonus bDefRate,-50; bonus bMdefRate,-50; }",180,0,0,EFST_MVPCARD_TAOGUNKA; for the fix, you can change the primary key in the db. since type field is only have 3 type 0,1,2 which maybe will be used in multiple script_bonus script, try replacing the primary key of table with char id and icon, which mean you can't use same icon for each entry of bonus_script and icon has many type and you can make new icon too. -- -- Table structure for table `bonus_script` -- CREATE TABLE IF NOT EXISTS `bonus_script` ( `char_id` INT(11) UNSIGNED NOT NULL, `script` TEXT NOT NULL, `tick` BIGINT(20) NOT NULL DEFAULT '0', `flag` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0', `type` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', `icon` SMALLINT(3) NOT NULL DEFAULT '-1', PRIMARY KEY (`char_id`, `icon`) ) ENGINE=InnoDB;
  7. try this, untested in game or compile : bHPGainRateWhenHit.patch
  8. the md (monster data) is null, because the mob isn't there but the code send it anyway to clif_bossmapinfo, there is 2 way imo to solve this. search for code which responsible sending clif_bossmapinfo with flag BOSS_INFO_ALIVE_WITHMSG then add check there if md is null don't send it, or you can put check on the function clif_bossmapinfo on case flag BOSS_INFO_ALIVE_WITHMSG, put condition if md is null do return, so it will be back to wherever it call and not sending this packet.
  9. // START OF NEW CHECK - [Duplicate IP in one party?] attachrid [email protected]; // Check Party Members [email protected] = getcharid(1); if ([email protected] == 0) { mes "you have no party"; close; } getpartymember [email protected], 2, [email protected]; [email protected] = [email protected]; // make sure there is no pause between the check and collected party member data // like script command next, select, prompt, sleep2, sleep. for ([email protected] = 0; [email protected] < [email protected]; [email protected]++) { // no need to check with isloggedin anymore, // if failed to attach meaning the party member / player isn't online, // since only one char in account id can online at one time. if (attachrid([email protected][[email protected]]) == true) { // getcharip() script command was there in the script engine, why query? [email protected]$ = getcharip(); // script for you self? if use gepard do not bother using query, // get_unique_id() should be there in the script engine, why query? [email protected] = get_unique_id(); // check ip duplicate if (([email protected] = inarray([email protected]$, [email protected]$)) > -1) [email protected]_$[getarraysize([email protected]_$)] = strcharinfo(0); else [email protected]$[getarraysize([email protected]$)] = [email protected]$; // check gepard unique id duplicate if (([email protected] = inarray([email protected], [email protected])) > -1) [email protected]$[getarraysize([email protected]$)] = strcharinfo(0); else [email protected][getarraysize[[email protected]]] = [email protected]; } } // Get back to party leader to display message attachrid [email protected]; if (getarraysize([email protected]_$)) { mes "There is party member that found with same ip they are "+ implode([email protected]$, ","); close; } if (getarraysize([email protected]$)) { mes "There is party member that found with same pc they are "+ implode([email protected]$, ","); close; } // END OF NEW CHECK
  10. udah dari 2018 ini klo lg penuh kek lg pasar pas lebaran https://letmegooglethat.com/?q=telkom+dropping+packet
  11. this is super weird, functor even reacted up there.
  12. first make a mysql user that suit your need. replace user, ip, password and your_db to what you need. ip can be "%" which mean can from anywhere CREATE USER 'user'@'ip' IDENTIFIED BY 'password'; GRANT ALL ON your_db.* TO 'user'@'ip'; note: grant all is bad practice, imo just set permission as you deem fit (i am lazy to look up permission that needed for rA db). find in file '/etc/mysql/my.cnf' set bind-address value like below. "x.x.x.x" is ip that used when created mysql user or can be set with "0.0.0.0" to match if you use "%" when created mysql user. # # Allow server to accept connections on all interfaces. # bind-address=x.x.x.x
  13. you can use file monster_size_effect in folder system and play around the mob size and effect with that
  14. prefer method 1, another note with an array and card id as index and price will get same output. duh when I said "simplify", my script is too extra haha..
  15. after re-reading the script I see err in my writing.. [email protected]_list$ = getarg(1, ""); if ([email protected]$ == "") { debugmes sprintf("[%s] AddCard: card list is empty for price %d", strnpcinfo(0), [email protected]); return; } explode([email protected]$, [email protected]_list$, ":"); for ([email protected] = 0; [email protected] < getarraysize([email protected]$); [email protected]++) { [email protected] = atoi([email protected]$); should be [email protected]_list$ = getarg(1, ""); if ([email protected]_list$ == "") { debugmes sprintf("[%s] AddCard: card list is empty for price %d", strnpcinfo(0), [email protected]); return; } explode([email protected]$, [email protected]_list$, ":"); for ([email protected] = 0; [email protected] < getarraysize([email protected]$); [email protected]++) { [email protected] = atoi([email protected]$[[email protected]]); here fixed script. prontera,181,204,4 script Card Buyer#rAthena 658,{ mes "[Card Buyer]"; mes "You have any card to sell ? <3"; next; getinventorylist; for ([email protected] = 0; [email protected] < @inventorylist_count; [email protected]++) { [email protected]_id = @inventorylist_id[[email protected]]; [email protected]_qt = @inventorylist_amount[[email protected]]; if (getiteminfo([email protected]_id, 2) != 6) continue; // skip not card // find if this card can be sold to this npc [email protected] = inarray(.card_list, [email protected]_id); // not in list card that can be sold, skip! if ([email protected] == -1) continue; [email protected]$[[email protected]] = getitemname([email protected]_id) +" "+ callfunc("F_InsertComma", .card_price[[email protected]_id]); [email protected]_ids[[email protected]] = [email protected]_id; [email protected]_qts[[email protected]] = [email protected]_qt; [email protected]++; } if ([email protected]) { mes "[Card Buyer]"; mes "You don't have any card huh?"; close; } [email protected] = select(implode([email protected]$, ":")) -1; mes "[Card Buyer]"; [email protected]_id = [email protected]_ids[[email protected]]; [email protected]_qt = [email protected]_qts[[email protected]]; mes "You have "+ callfunc("F_InsertComma", [email protected]_qt) +"x "+ getitemname([email protected]_id); mes "You want to sell "+ getitemname([email protected]_id) +"? I will pay you "+ callfunc("F_InsertComma", .card_price[[email protected]_id]) +"z/ea"; [email protected] = .card_price[[email protected]_id] * [email protected]_qt; mes "For total: "+ callfunc("F_InsertComma", [email protected])+"z."; select("Yes"); delitem [email protected]_id, [email protected]_qt; Zeny += [email protected]; clear; mes "[Card Buyer]"; mes "Thank you for your patronage!"; close; OnInit: function AddCard; /* @param price in zeny @param "card id:card id:card id:...." Sample: AddCard(10000, "4001:4002:4003"); */ freeloop(true); AddCard(100000, "4032:4013:4023:4009:4004:4002:4026:4019:4006:4050:4008:4011:4001:4021:4022:4028:4016:4051"); AddCard(500000, "4043:4015:4052:4027:4003:4014:4012:4010:4034"); freeloop(false); end; function AddCard { [email protected] = getarg(0, 0); if ([email protected] < 1) { debugmes sprintf("[%s] AddCard: buying price is %d, minimum price is 1", strnpcinfo(0), [email protected]); return; } [email protected]_list$ = getarg(1, ""); if ([email protected]_list$ == "") { debugmes sprintf("[%s] AddCard: card list is empty for price %d", strnpcinfo(0), [email protected]); return; } explode([email protected]$, [email protected]_list$, ":"); for ([email protected] = 0; [email protected] < getarraysize([email protected]$); [email protected]++) { [email protected] = atoi([email protected]$[[email protected]]); if (getitemname([email protected]) == "null") { debugmes sprintf("[%s] AddCard: card id %d is not exist price %d", strnpcinfo(0), [email protected], [email protected]); continue; } [email protected] = inarray(.card_list, [email protected]); if ([email protected] > -1) { debugmes sprintf("[%s] AddCard: card id %d duplicate entry, first set price %d", strnpcinfo(0), [email protected], .card_price[[email protected]]); continue; } .card_list[getarraysize(.card_list)] = [email protected]; .card_price[[email protected]] = [email protected]; } return; } } just ask... if anyone has time and understand it, maybe there is someone will answer.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.