-
Content Count
1677 -
Joined
-
Last visited
-
Days Won
246
Content Type
Profiles
Forums
Downloads
Staff Applications
Calendar
Everything posted by AnnieRuru
-
yes this is obviously FluxCP ... need PHP knowledge ... and I don't have XD items automatically place inside player's inventory ? what would happen if the player was already carrying 100 type of items ? let me test ... prontera,155,185,5 script ksdfhsf 1_F_MARIA,{ freeloop true; .@cid = getcharid(0); for ( .@i = 500; .@i < 1000; ++.@i ) { if ( getitemname(.@i) != "null" ) { getitem .@i, 1; if ( !checkweight(.@i,1) ) { // give item until full MAX_INVENTORY atcommand "@kick "+ strcharinfo(0); sleep 1000; for ( ; .@i < 1000; ++.@i ) { // continue give item until 1000 ... if ( getitemname(.@i) != "null" ) query_sql "insert into inventory ( char_id, nameid, amount, identify ) values ( "+ .@cid +", "+ .@i +", 1, 1 );"; } break; } } } end; } seems player load data with 100 items ... if you store some item inside storage(have 98/100), and then relog, the item will suddenly appear back to 100/100), 2 more items loaded anyway this totally confirm my doubt ... promotion code is something to be done on the FluxCP, not with npc scripting
-
how do the players input this BV9F-JSM1 ... code ? inside fluxCP ? then the fluxCP automatically send mail to the account ?
-
hmm .. then how do the official server actually preventing players from using the SAME promotion code for multiple accounts ? because when I was fixing the script on rathena forum... I already noticed this 1. each account can only clam once 2. each IP can only claim once <-- not safe 3. use *getitembound ... ok I have no objection so I can abuse the system with, 1. after I got a promotion code, that can claim 10 times, 2. login an account, claim once .... 3. logout the game, restart the modem, shuffle your IP address 4. login another account, claim again repeat 10 times ok, let's say generate 100 different codes for 100 different donors... so they can use each code only once (limit 100 times) means generating 100 different codes for each player ... this only makes the GMs confused which code has been used b4 ... instead give out some gibberish word that you have sure which code is available, why not just give the item to them by let the player click on the npc ? unless I can clear out these doubts, I'm not going to make this scripts ... seems exploitable ... or maybe someone who actually has used this system b4, know how this system works, release a script for it so I can take a peek ... because all the promotion npc on the forum(hercules/rathena) can be exploit in some way prontera,155,185,5 script Reward/Compensation 1_F_MARIA,{ if ( #Compensation_June2018 ) { mes "you have claimed compensation"; close; } mes "We apologize for blah blah blah"; mes "so I give you a candy"; if ( !checkweight(Candy,1) ) { mes "hahaha you don't even has enough space to claim a candy hahaha"; close; } getitembound Candy, 1, 1; #Compensation_June2018 = 1; close; OnInit: OnHour00: if ( gettime(GETTIME_MONTH) == JUNE && gettime(GETTIME_DAYOFMONTH) >= 9 && gettime(GETTIME_DAYOFMONTH) <= 15 ) enablenpc strnpcinfo(0); else disablenpc strnpcinfo(0); end; } for me its a simple script ... but now you actually struct me with an idea to actually write one that can configure the time and the prize given.......
-
{ // send message to others void *buf = aMalloc(8 + outlen); WBUFW(buf, 0) = 0x8d; WBUFW(buf, 2) = 8 + outlen; WBUFL(buf, 4) = sd->bl.id; if (is_fakename) safesnprintf(WBUFP(buf, 8), outlen, "%s : %s", sd->fakename, message); else safestrncpy(WBUFP(buf, 8), full_message, outlen); //FIXME: chat has range of 9 only clif->send(buf, WBUFW(buf, 2), &sd->bl, sd->chat_id != 0 ? CHAT_WOS : AREA_CHAT_WOC); aFree(buf); } change the clif->send line .... the trigger range from AREA_CHAT_WOC into ALL_SAMEMAP I guess ?
- 9 replies
-
- source
- configuration
-
(and 1 more)
Tagged with:
-
if you want player A to type something that player B can hear from any place in the map its #map channel https://drive.google.com/file/d/14DhRqCfxY4assgenwnoZ4dIBud8zQlfj/view?usp=sharing I think its better to leave the normal chat to chat_area_size, it have its own purpose
- 9 replies
-
- source
- configuration
-
(and 1 more)
Tagged with:
-
rathena has too many topic for this https://rathena.org/board/topic/115772-race-to-99-per-class/ although, all of them doesn't use SQL table I wonder why you need the SQL table for ? what kind of information you want to display on your website ?
-
@Rebel prontera,146,185,6 script Costume Enchanter 4_M_SCIENCE,{ disable_items; .@header$ = "[^0000FF Costume Enchanter ^000000]"; mes .@header$; if (Zeny < 500000) { mes "I am in charge of Enchanting Costume Headgears. Simply put, I've been studying ways to power-up headgears."; next; mes .@header$; mes "If by any chance, you would want to enchant your headgears, bring me 500,000 zeny and the armor you want to enchant and you are all set to go."; close; } mes "I'm an engineer that specializes in Enchanting Armors."; next; mes .@header$; mes "Enchanting may seem simple, but it's far more complicated than it looks.\n"; mes "If you're interested in my service, let me know."; next; switch( select( "~ ^0000FFEnchant Headgear ^000000", "~ Information", "~ Maybe next time." ) ) { case 1: break; case 2: mes .@header$; mes "To be update"; close; case 3: mes .@header$; mes "Please come back when you have any interest in enchanting your headgear."; close; } setarray .@items[0],19504,19505,19506; // Red_Tailed_Ribbon; .@failrate = 1; // 1% fail rate (for testing) .@menu$ = ""; .@size = getarraysize(.@items); for ( .@i = 0; .@i < .@size; ++.@i ) .@menu$ += getitemname(.@items[.@i]) +":"; .@itemid = .@items[select(.@menu$)-1]; if (getequipid(EQI_COSTUME_HEAD_TOP) == .@itemid) .@part = EQI_COSTUME_HEAD_TOP; else if (getequipid(EQI_COSTUME_HEAD_MID) == .@itemid) .@part = EQI_COSTUME_HEAD_MID; else if (getequipid(EQI_COSTUME_HEAD_LOW) == .@itemid) .@part = EQI_COSTUME_HEAD_LOW; // else if (getequipid(EQI_HEAD_TOP) == .@itemid) // .@part = EQI_HEAD_TOP; mes .@header$; if ( !getequipisequiped(.@part) ) { mes "Hmm? There's nothing to be enchanted!"; mes "Make sure you are wearing the headgear you want be enchant."; close; } if ( getequipcardid(.@part,1) && getequipcardid(.@part,2) && getequipcardid(.@part,3) ) { mes "There's nothing more I can do with this headgear."; close; } .@refine = getequiprefinerycnt(.@part); for ( .@i = 3; .@i >= 1; --.@i ) if ( !getequipcardid( .@part, .@i ) ) .@slot_num = .@i; for ( .@i = 0; .@i < 4; ++.@i ) .@cardid[.@i] = getequipcardid( .@part,.@i ); mes "Socket enchant will cost you 500,000z. And there will be a random option enchanted."; mes "Of course, there is a chance of breaking your armor."; next; mes .@header$; mes "Do you still want to try an Enchant?"; next; if ( select( "~ Hmm... Let me think it over.", "~ Go ahead.") == 1 ) { mes .@header$; mes "Well, I can't blame you. Safety first, eh?"; mes "Now you have a nice day."; close; } mes .@header$; if (Zeny < 500000) { mes .@header$; mes "Sorry, but you don't have enough zeny."; close; } mes "Quite of an adventurer huh? Well, shall we?"; Zeny -= 500000; delitem2 .@itemid, 1,1, .@refine,0, .@cardid[0],.@cardid[1],.@cardid[2],.@cardid[3]; close2; specialeffect EF_MAPPILLAR, AREA, playerattached(); progressbar "ffff00",1; // is this really needed ? what happen if the player logout/disconnect during this short period ? The item is gone forever !! switch (rand(1,.@failrate)) { // yeah you said its testing, maybe its 1,36 ... or maybe something higher case 1: .@addpart = 4702;break; case 2: .@addpart = 4712;break; case 3: .@addpart = 4722;break; case 4: .@addpart = 4732;break; case 5: .@addpart = 4742;break; case 6: .@addpart = 4752;break; case 7: case 8: .@addpart = 4701;break; case 9: case 10: .@addpart = 4711;break; case 11: case 12: .@addpart = 4721;break; case 13: case 14: .@addpart = 4731;break; case 15: case 16: .@addpart = 4741;break; case 17: case 18: .@addpart = 4751;break; case 19: case 20: case 21: .@addpart = 4700;break; case 22: case 23: case 24: .@addpart = 4710;break; case 25: case 26: case 27: .@addpart = 4720;break; case 28: case 29: case 30: .@addpart = 4730;break; case 31: case 32: case 33: .@addpart = 4740;break; case 34: case 35: case 36: .@addpart = 4750;break; default: specialeffect(EF_PHARMACY_FAIL, AREA, playerattached()); mes .@header$; mes "Well that's too bad."; mes "The requested equipment has failed to enchant."; close; } mes .@header$; mes "Ha! There you go, your brand new enchanted equipment!"; if ( .@slot_num == 1 ) { getitem2 .@itemid, 1, 1, .@refine, 0, .@cardid[0], .@addpart, .@cardid[2], .@cardid[3]; equip2 .@itemid, .@refine, 0, .@cardid[0], .@addpart, .@cardid[2], .@cardid[3]; } else if ( .@slot_num == 2 ) { getitem2 .@itemid, 1, 1, .@refine, 0, .@cardid[0], .@cardid[1], .@addpart, .@cardid[3]; equip2 .@itemid, .@refine, 0, .@cardid[0], .@cardid[1], .@addpart, .@cardid[3]; } else if ( .@slot_num == 3 ) { getitem2 .@itemid, 1, 1, .@refine, 0, .@cardid[0], .@cardid[1], .@cardid[2], .@addpart; equip2 .@itemid, .@refine, 0, .@cardid[0], .@cardid[1], .@cardid[2], .@addpart; } close; }
-
Question: How to generate a random number in SQL Answer: sometimes I think member just doesn't want to use google ... rand(a,b) -> SELECT FLOOR(RAND()*(b-a+1))+a; Where a is the smallest number and b is the largest number that you want to generate a random number for. rand(10,25) -> SELECT FLOOR(RAND()*(25-10+1))+10; Question: Sometimes I get this error [SQL]: DB error - BIGINT UNSIGNED value is out of range in '(`hercules`.`pvpladder`.`points` - 10)' [Debug]: at d:\ragnarok\hercules\src\map\script.c:17495 - INSERT INTO `pvpladder` VALUE ( 150001, 'AnnieRuru', 0 ) ON DUPLICATE KEY UPDATE `points` = IF( `points` - 10 < 0, 0, `points` - 10) [Debug]: Source (NPC): PvP Ladder at prontera (155,185) with the attached script, `pvpladder` table does not has any column with BIGINT field ... why ? Answer: drop the UNSIGNED from the `points` field even if you don't want to save the data in negative value, but the engine still needs to do calculation for it
-
https://rathena.org/board/topic/115232-script-doesnt-recognize-spaces/ can somebody actually explain to me what's this promotion code does ? all I understand is GM generate a random gibberish alphabets and numbers and players input a random gibberish alphabets and numbers, then they get the item ? imo ... if the goal is to let GM gives item to the player, why not just give the player item directly by mailing them ?
-
Refine rate of WS with visual on how many upgrade it has been
AnnieRuru replied to kifu21's question in Source Requests
you are asking 2 different things 1. increase the refine chance look at my post closely ... status->get_refine_chance is equal to *getequiprefinerycnt ... it reads from db\re\refine._db.conf file since the line below takes the rand() chance at 1000 and not 100, so per += 100 means increase 10% chance 2. show the item name with +refine just apply the patch from the topic I link to -
0.4 http://upaste.me/75d049918e2088402 wow ~ thanks ... having an extra eye is different ... about turning the [BASF+] into player configured buff ... that will be done in another day ...
-
I guess should just implement all the custom features that I know, since you keep requesting this and that better to overdo it and then let you suggest which feature you want me to take out, rather than keep asking for more features each time ... of course if you got some other features that you want to suggest, you can always post here http://upaste.me/fa2349922cf42b53b I wanted to add the rejoin system like I did on arathi basin or this bg_emp_0.6 but it seems rathena cannot retrieve the instance variable outside of the instance npc, so unless you want to drop the instancing and use normal map ... EDIT: suddenly I think its possible ... every time a variable is set, push back as npc variable ... hmm ...
-
Move to Script Release nice idea !! if combine this with World Boss system I can see a lot of potential in this
-
Refine rate of WS with visual on how many upgrade it has been
AnnieRuru replied to kifu21's question in Source Requests
per = status->get_refine_chance(ditem->wlv, (int)item->refine, REFINE_CHANCE_TYPE_NORMAL) * 10; // Aegis leaked formula. [malufett] if (sd->status.class == JOB_MECHANIC_T) per += 100; else per += 5 * (sd->status.job_level - 50); just add per += ... whatever you like -
http://upaste.me/aa5e49917485b4900 I need some people to comment on my script I just bam bam and google here and there and it works on VS2015, but not sure if it is work on others though 1. need help how to really optimize this code 2.not really sure about using this kind of function char *showing_buff( struct map_session_data *sd ) { @meko @4144 http://upaste.me/75d049918e2088402 no idea how I get this error message, only pop up once [Error]: --- nullpo info -------------------------------------------- [Error]: ..\src\plugins\showbuff.c:115: 'p' in function `unknown' [Error]: --- end nullpo info ---------------------------------------- @xVec
-
{ Id: 604 AegisName: "Branch_Of_Dead_Tree" Name: "Dead Branch" Type: "IT_DELAYCONSUME" Buy: 50 Weight: 50 BuyingStore: true Script: <" if ( strcharinfo(PC_MAP) == "prontera" ) { monster "this",-1,-1,"--ja--",-1,1,""; delitem 604, 1; } "> }, isn't that's the same answer I had said in rathena ?
-
up script to 2.1a - add a debugging line to tell how many NPC you need remain commented, however, should only run once to know how many NPC you need thanks to @Begin for showing me his edited script
-
Related commit : https://github.com/HerculesWS/Hercules/pull/842 if you have event scripts that uses *pcblockmove, its time to convert into *setpcblock Example : (old) pcblockmove(getcharid(CHAR_ID_ACCOUNT), true); now should be setpcblock(PCBLOCK_MOVE, true); the new one is more flexible and can limit other actions too
-
up to plugin to 2.1a - fix a bug that will cause map-server to spam error if the player has pets or homunculus walk over the tiles ----- should have use BL_CAST and not BL_UCAST... BL_UCAST should only use in iterations [Debug]: mapindex_id2name: Requested name for non-existant map index [0] in cache. ..\src\plugins\zzz.c::53 post your edited script here or in discord
-
prontera,158,185,1 script Debug 1_F_MARIA,{ input #Treasure_Token, 0, 10000; Zeny = 0; } prontera,161,185,1 script Debug 2 1_F_MARIA,{ select "5m Zeny -> 1 Token", "50m Zeny -> 10 Token", "500m -> 100 Token", "Nevermind"; dispbottom @menu +" "+ 5000000 * 10 ** (@menu -1) +" "+ 10 ** (@menu -1); close; } prontera,155,185,1 script Treasure Hunter's Shop 1_M_YOUNGKNIGHT,{ mes "[Ash]"; mes "Ahh, "+ strcharinfo(PC_NAME) +"! Welcome to the Offical Treasure Hunter's Guild Shop."; mes "You currently have ^FF0000"+ #Treasure_Token +"^000000 treasure tokens!!!"; next; switch( select( "How does this place work?","What do you have in stock?","Nevermind" ) ) { case 1: mes "[Ash]"; mes "Well you see here you can exchange your treasure hunter tokens for zeny or rare weapons forged by our blacksmiths."; mes " "; mes "Everything has its own price value and the only way you can get the tokens is by completing quests assigned to you,the system normally works like this."; mes " "; mes "The harder the mission the more Tokens you will earn. All red quests are worth 4-8 Tokens, and the rest are worth 1-5."; mes " "; mes "Hope that solves your problem and questions."; close; case 2: mes "[Ash]"; mes "Ok here is our Big list of goods."; mes " "; mes "(Note T stands for a Treasure Token.)"; next; mes "[Ash]"; mes "This is what we have to offer."; next; switch( select( "Trade with zeny", "Nevermind" ) ) { case 1: select "5m Zeny -> 1 Token", "50m Zeny -> 10 Token", "500m -> 100 Token", "Nevermind"; if ( @menu == 4 ) close; if ( #Treasure_Token < 10 ** (@menu -1) ) { mes "[Ash]"; mes "You don't have enough tokens!"; close; } if ( Zeny > MAX_ZENY - 5000000 * 10 ** (@menu -1) ) { mes "[Ash]"; mes "You can't add more zeny to your character"; close; } Zeny += 5000000 * 10 ** (@menu -1); #Treasure_Token -= 10 ** (@menu -1); close; default: } default: } close; } btw your way of handling the MAX_ZENY is wrong, can cause integer overflow [Warning]: script:op_2num: overflow detected op=C_ADD i1=2147483647 i2=500000000 [Debug]: Source (NPC): Treasure Hunter's Shop at prontera (155,185) if you don't like mathematics then just hard-code the value prontera,155,185,1 script Treasure Hunter's Shop 1_M_YOUNGKNIGHT,{ mes "[Ash]"; mes "Ahh, "+ strcharinfo(PC_NAME) +"! Welcome to the Offical Treasure Hunter's Guild Shop."; mes "You currently have ^FF0000"+ #Treasure_Token +"^000000 treasure tokens!!!"; next; switch( select( "How does this place work?","What do you have in stock?","Nevermind" ) ) { case 1: mes "[Ash]"; mes "Well you see here you can exchange your treasure hunter tokens for zeny or rare weapons forged by our blacksmiths."; mes " "; mes "Everything has its own price value and the only way you can get the tokens is by completing quests assigned to you,the system normally works like this."; mes " "; mes "The harder the mission the more Tokens you will earn. All red quests are worth 4-8 Tokens, and the rest are worth 1-5."; mes " "; mes "Hope that solves your problem and questions."; close; case 2: mes "[Ash]"; mes "Ok here is our Big list of goods."; mes " "; mes "(Note T stands for a Treasure Token.)"; next; mes "[Ash]"; mes "This is what we have to offer."; next; switch( select( "Trade with zeny", "Nevermind" ) ) { case 1: switch( select( "5m Zeny -> 1 Token", "50m Zeny -> 10 Token", "500m -> 100 Token", "Nevermind" ) ) { case 1: .@zeny = 5000000; .@token = 10; break; case 2: .@zeny = 50000000; .@token = 10; break; case 3: .@zeny = 500000000; .@token = 100; break; case 4: close; } if ( #Treasure_Token < .@token ) { mes "[Ash]"; mes "You don't have enough tokens!"; close; } if ( Zeny > MAX_ZENY - .@zeny ) { mes "[Ash]"; mes "You can't add more zeny to your character"; close; } Zeny += .@zeny; #Treasure_Token -= .@token; close; default: } default: } close; }
-
https://rathena.org/board/topic/115744-a-battleground-idea-d/ since you mark it as solve, then I assume you don't want to make any changes anymore http://upaste.me/60d349911d51d3996 and move on to other project
-
remember, the sleep type timer can run multiple times, and when *awake, will cancel ALL running timer prontera,155,185,5 script dhskfshfd 1_F_MARIA,{ sleep 30000; announce .t++ +" times", bc_all; end; OnInit: bindatcmd "ev", strnpcinfo(0)+"::Onaaa"; end; Onaaa: awake strnpcinfo(0); end; } click on the npc as many times as possible to queue up the timer and when type @ev, all gets execute at once my guess is you make the sleep for auto-invasion and the time remaining in the same npc so when you do a *awake, instead of you want only the timer for next invasion gets awaken, but the event in-progress timer also gets cancel since you have the "inv_msg" npc, make use of that to run another kind of npc timer yup, 1 npc, 1 timer @OmarAcero and, yeah, VERY bad script, should make the script read in linear form, not jump here and there
-
How do you get this error message ?
-
yeah we don't have *unitexists script command like rathena although I am also not sure want to implement or not because since the monster is set with a variable upon the monster died, the event label can reset the variable back to 0 EDIT: ... maybe implement it then, with *unitexists script command maybe the .mobid there can become .@mobid PS: the script command setunitdata/getunitdata has more than 70% are not functioning, https://github.com/HerculesWS/Hercules/compare/stable...AnnieRuru:34-setunitdata and its not yet complete
-
you should assume all my plugins broken, just like my signature says 2.1 script & plugin - fix the script and use constant properly - revert back to *unitwalk