Jump to content

Emistry

Forum Moderator
  • Posts

    10015
  • Joined

  • Days Won

    396

Everything posted by Emistry

  1. actually can, using the unitwarp(...) script command, but it create unnecessary error when you do reloadscript back to the topics, this NPC script cant be done without the create/duplicate/clone NPC. The NPC need to be allow to support concurrent triggered by users. There could be more than one players use the item to generate the NPC which only they can see it. If you use only one or specific few NPC, it cant support the demand. it need to clone the NPC then do cloakon to display the NPC, then delete the NPC upon done.
  2. your questinfo file has invalid file format, probably a missing or extra comma.
  3. addrid(2, 0, getcharid(1)); unittalk getcharid(3), "Hey!";
  4. the server info has nothing to do with your issue which unable to connect to the server. that meant both of you have configured the server wrongly.
  5. - script sample -1,{ OnInit: .map$ = "prontera"; setmapflag(.map$, mf_loadevent); end; OnPCLoadMapEvent: if (strcharinfo(3) == .map$) { deltimer strnpcinfo(3)+"::OnExpire"; addtimer (3 * 60 * 60000), strnpcinfo(3)+"::OnExpire"; } end; OnExpire: warp "prontera", 155, 181; end; }
  6. when player try to donate, add this validation if (#motd_daily_limit == gettime(DT_YYYYMMDD)) { mes "[Monster Of The Day]"; mes "You have already donated today. Come back again tomorrow."; close; } when they success donate, add this mes "[Monster Of The Day]"; mes "Zeny has succesfully transfered."; Zeny -= .@motd_zeny; $motd_zeny += .@motd_zeny; $motd_diff -= .@motd_zeny; #motd_daily_limit = gettime(DT_YYYYMMDD); // <----- THIS LINE
  7. https://rathena.org/board/files/file/3304-act-editor/
  8. he is trying to recreate the iRO Ragial or the RagnaStats website probably for private servers. but yeah, this should be the correct approach. and also, if you cant find someone thru PM, its pointless to post in forum. Stop notifying other just to notify the person you trying to reach.
  9. conf/battle/misc.conf#L64-L75 // Choose if server begin with night (yes) or day (no) night_at_start: no // Define duration in msec of the day (default: 7200000 = 2 hours) // Set to 0 to disable day cycle (but not @day GM command). // Except 0, minimum is 60000 (1 minute) day_duration: 0 // Define duration in msec of the night (default: 1800000 = 30 min) // Set to 0 to disable night cycle (but not @night GM command). // Except 0, minimum is 60000 (1 minute) night_duration: 0
  10. NPC no longer exists, example: happen commonly when you talking to a NPC but someone do a reloadscript before you finish talk with the NPC.
  11. src\map\clif.cpp /* * Request to Open the banking system * 09B6 <aid>L ??? (dunno just wild guess checkme) */ void clif_parse_BankOpen(int fd, struct map_session_data* sd) { //TODO check if preventing trade or stuff like that //also mark something in case char ain't available for saving, should we check now ? nullpo_retv(sd); if( !battle_config.feature_banking ) { clif_messagecolor(&sd->bl,color_table[COLOR_RED],msg_txt(sd,1496),false,SELF); //Banking is disabled return; } + else if (sd->bank_vault <= 0) { + clif_messagecolor(&sd->bl, color_table[COLOR_RED], "You haven't open a bank account yet.", false, SELF); // Banking is disabled + } else { struct s_packet_db* info = &packet_db[RFIFOW(fd,0)]; int aid = RFIFOL(fd,info->pos[0]); //unused should we check vs fd ? if(sd->status.account_id == aid){ sd->state.banking = 1; //request save ? //chrif_bankdata_request(sd->status.account_id, sd->status.char_id); //on succes open bank ? clif_bank_open(sd); } } } add a condition to block the Bank Button access if bank vault have no Zeny. use the NPC script below to deposit Zeny into the vault. prontera,155,181,5 script Bank 757,{ if (#BANKVAULT > 0) { mes "Enjoy using your Bank Account."; } else { mes "Would you like to open a Bank Account?"; mes "How much Zeny you gonna deposit?"; input .@zeny, 0, Zeny; mes "You deposited "+F_InsertComma(.@zeny)+" Zeny."; Zeny -= .@zeny; #BANKVAULT += .@zeny; } close; }
  12. dispbottom "You've successfully mined the ore."; if (MineExp < 100000) { if (@minechance >= 12) .@mine_exp = 3; else if (@minechance >= 7) .@mine_exp = 2; else if (@minechance >= 1) .@mine_exp = 1; } if (.@mine_exp) { MineExp += .@mine_exp; dispbottom "You've gained "+.@mine_exp+" Mining Exp."; }
  13. - script day_night_npc -1,{ OnInit: bindatcmd("summonwarps", strnpcinfo(3) +"::OnWarpact"); end; //OnClock1151: //OnInit: OnWarpact: sleep 1; // if you want to use different script file, then slow down the script execution if(gettime(DT_DAYOFMONTH)==10) { // day warp enablenpc "launchwarp#1"; disablenpc "nightwarp#1"; } else { enablenpc "nightwarp#1"; disablenpc "launchwarp#1"; } end; } map,90,87,0 warp launchwarp#1 1,1,iz_int,18,26 //test your event label is wrong, and your script has extra curley bracket that ended the script, and causing errors
  14. you can also use this to search for the card in a user inventory *checkequipedcard(<card id>) This function will return 1 if the card specified by its item ID number is inserted into any equipment they have in their inventory, currently equipped or not.
  15. item_combo effect should be done at db/re/item_combo_db.txt this way, you won't need to worry about same effect triggered multiple times. isequipped(61500, 61501, 61502, 61503, 61504); using this would tell you how many items are currently equipped.
  16. //================================================== // gef_fild10 - Geffen Field //================================================== gef_fild10,0,0 monster Orc Warrior 1023,179,5000,0,"sample_npc_name::OnKill" gef_fild10,0,0 monster Orc Lady 1273,55,5000,0,"sample_npc_name::OnKill" gef_fild10,0,0 monster Orc Baby 1686,27,5000,0,"sample_npc_name::OnKill" gef_fild10,0,0,0,0 boss_monster Orc Lord 1190,1,7200000,600000,0,"sample_npc_name::OnKill" gef_fild10,46,350,5,5 monster Blue Plant 1079,3,900000,450000,"sample_npc_name::OnKill" gef_fild10,287,61,5,5 monster Blue Plant 1079,3,900000,450000,"sample_npc_name::OnKill" gef_fild10,300,253,5,5 monster Green Plant 1080,3,360000,180000,"sample_npc_name::OnKill" add a npc event to each of the monster in gef_fild10, and load the npc. - script sample_npc_name -1,{ OnKill: if (!mobcount(strcharinfo(3), strnpcinfo(3)+"::OnBossKill")) { if (.monster_kill < 10000) { .monster_kill++; if (.monster_kill >= 10000) { monster strcharinfo(3), 0, 0, "Lord of Orcs", 1190, 1, strnpcinfo(3)+"::OnBossKill"; } } else { .monster_kill = 0; } } end; OnBossKill: // rewards end; }
  17. https://rathena.org/board/topic/116439-showcase-npc-buyingstore/
  18. your setting isn't configured correctly. conf\inter_athena.conf // MySQL Login server login_server_ip: 127.0.0.1 login_server_port: 3306 login_server_id: ragnarok login_server_pw: ragnarok login_server_db: ragnarok login_codepage: login_case_sensitive: no ipban_db_ip: 127.0.0.1 ipban_db_port: 3306 ipban_db_id: ragnarok ipban_db_pw: ragnarok ipban_db_db: ragnarok ipban_codepage: // MySQL Character server char_server_ip: 127.0.0.1 char_server_port: 3306 char_server_id: ragnarok char_server_pw: ragnarok char_server_db: ragnarok // MySQL Map Server map_server_ip: 127.0.0.1 map_server_port: 3306 map_server_id: ragnarok map_server_pw: ragnarok map_server_db: ragnarok // MySQL Log Database log_db_ip: 127.0.0.1 log_db_port: 3306 log_db_id: ragnarok log_db_pw: ragnarok log_db_db: ragnarok log_codepage: log_login_db: loginlog
  19. you can try this. - script SupplyTrigger -1,{ OnInit: OnSat1930: OnSun1930: OnAgitEnd: OnAgitEnd2: if (gettime(DT_HOUR) == 19 && gettime(DT_MINUTE) >= 30) { hideoffnpc "Guild Supply#1"; hideoffnpc "Supply#2"; hideoffnpc "Guild Supply#3"; // hideoffnpc "Guild Supply#4"; } else { hideonnpc "Guild Supply#1"; hideonnpc "Supply#2"; hideonnpc "Guild Supply#3"; // hideonnpc "Guild Supply#4"; } end; } as long as the time is between 07:30PM to 07:59PM, the NPC will be enabled.
  20. monster "<map name>",<x>,<y>,"<name to show>",<mob id>,<amount>{,"<event label>",<size>,<ai>}; may refer dead branch item for example.
  21. https://rathena.org/board/topic/74160-remove-buff-from-gospel-when-enter-a-map/
  22. true, but its not really an ideal solution. why? although the emulator is kinda updated but the emulator still assume array value 0 still exists. .array[4001] = 999999; debugmes ".array size = " + getarraysize(.array); // output: .array size = 4002 this meant, your current array total size is 4002, which wasted the memory the allocated for the total of 4001 data from index 0 to 4000, and you dont even need it. dont forgot that card_id could be above 5 digits or even 6 digits ID nowadays, which will end up wasting even more than we expected..
  23. there are multiple way to do it .... method 1. by exploit the setd/getd to store the price of each card into a variable, so less looping required. prontera,155,181,5 script Card Buyer 757,{ mes "["+strnpcinfo(1)+"]"; mes "You have any card to sell ? <3"; next; getinventorylist; for (.@i = 0; .@i < @inventorylist_count; .@i++) { .@price = getd(".card_"+@inventorylist_id[.@i]); if (.@price) .@menu$ = .@menu$ + getitemname(@inventorylist_id[.@i]) + " ^FF0000"+F_InsertComma(.@price)+" Zeny^000000"; .@menu$ = .@menu$ + ":"; } .@i = select(.@menu$) - 1; clear; .@price = getd(".card_"+@inventorylist_id[.@i]); mes "["+strnpcinfo(1)+"]"; mes "Sell "+getitemname(@inventorylist_id[.@i])+" for ^FF0000"+F_InsertComma(.@price)+" Zeny^000000?"; if (select("Confirm", "Cancel") == 1) { delitem @inventorylist_id[.@i], 1; Zeny += .@price; clear; mes "["+strnpcinfo(1)+"]"; mes "You have sold "+getitemname(@inventorylist_id[.@i])+" for ^FF0000"+F_InsertComma(.@price)+" Zeny^000000."; } close; function AddCard { .@price = getarg(0, 0); .@getargcount = getargcount(); for (.@i = 1; .@i <= .@getargcount; .@i++) setd(".card_"+getarg(.@i, 0), .@price); return; } OnInit: // AddCard( <zeny>, <card_id>...); AddCard( 10000, 4001, 4002, 4003, 4004); AddCard(100000, 4011, 4012, 4013, 4014); AddCard(500000, 4021, 4022, 4023, 4024, 4025); AddCard(999999, 4031, 4032, 4033, 4034, 4035, 4036); end; } method 2. by adjust the buy field in item_db, and set it to the value you want, then have the NPC to check for "Buy" value (why buy and not sell? because we wouldn't want player to exploit overcharge skill and direct sell to NPC) Example: set the Poring Card's Buy value to 999,999 Zeny - Id: 4001 AegisName: Poring_Card Buy: 999999 and have the NPC check and retrieve the Buy field value and use as selling price. prontera,155,181,5 script Card Buyer 757,{ mes "["+strnpcinfo(1)+"]"; mes "You have any card to sell ? <3"; next; getinventorylist; for (.@i = 0; .@i < @inventorylist_count; .@i++) { .@price = getiteminfo(@inventorylist_id[.@i], ITEMINFO_BUY); if (.@price && getiteminfo(@inventorylist_id[.@i], ITEMINFO_TYPE) == IT_CARD) .@menu$ = .@menu$ + getitemname(@inventorylist_id[.@i]) + " ^FF0000"+F_InsertComma(.@price)+" Zeny^000000"; .@menu$ = .@menu$ + ":"; } .@i = select(.@menu$) - 1; clear; .@price = getiteminfo(@inventorylist_id[.@i], ITEMINFO_BUY); mes "["+strnpcinfo(1)+"]"; mes "Sell "+getitemname(@inventorylist_id[.@i])+" for ^FF0000"+F_InsertComma(.@price)+" Zeny^000000?"; if (select("Confirm", "Cancel") == 1) { delitem @inventorylist_id[.@i], 1; Zeny += .@price; clear; mes "["+strnpcinfo(1)+"]"; mes "You have sold "+getitemname(@inventorylist_id[.@i])+" for ^FF0000"+F_InsertComma(.@price)+" Zeny^000000."; } close; }
  24. you can try something like this. - script #mvp_kill -1,{ OnInit: setarray .p_rwd, 607,1; // Party reward <item>,<amount> setarray .s_rwd, 607,1; // Solo reward <item>,<amount> .chance = 50; // Drop rate chances % // .gm = 10; // Prevents gm level and above to trigger the event // MVP Map list setarray .t_maps$[0],"moc_pryd06","lhz_dun03","gld2_prt","abbey02","ayo_dun02","lhz_dun04","ra_fild02","xmas_fild01","dic_dun02","beach_dun","iz_dun05","tur_dun04","lhz_dun02","jupe_core","moc_fild22","anthell02","odin_tem03","gon_dun03","gef_fild02","thana_boss","gef_fild10","ein_dun02","gef_fild14","moc_pryd04","dew_dun01","in_sphinx5","niflheim","moc_fild17","xmas_dun02","ice_dun03","kh_dun02","treasure02","moc_prydn2","pay_dun04","ra_san05","mosk_dun03","ama_dun03","thor_v03","gef_dun01","mjolnir_04","abyss_03","dic_dun03","prt_sewb4","pay_fild11","gef_dun02","gl_chyard","ra_fild03","ra_fild04","ve_fild01","ve_fild02","lou_dun03","prt_maze03","bra_dun02"; .t_maps_size = getarraysize(.t_maps$); end; OnNPCKillEvent: //if (getgmlevel() >= .gm) end; // If gm = event wont happen if (strcharinfo(3) == instance_mapname("06guild_01") || strcharinfo(3) == instance_mapname("force_1-1")) end; if (getmonsterinfo(killedrid, MOB_MVPEXP)) { for (.@a = 0; .@a < .t_maps_size; .@a++) { if (strcharinfo(3) == .t_maps$[.@a]) { if (getcharid(1)) { getpartymember getcharid(1), 1; getpartymember getcharid(1), 2; for (.@i = 0; .@i < $@partymembercount; .@i++) { if (isloggedin($@partymemberaid[.@i], $@partymembercid[.@i])) { .@partymemberaid[.@c] = $@partymemberaid[.@i]; .@c++; } } if (rand(100) < .chance) getitem .p_rwd[0], .p_rwd[1], .@partymemberaid[ rand(.@c) ]; .@announce_message$ = "[ System ] : Player ["+ strcharinfo(0) +"] of party ["+ strcharinfo(1) +"] has killed "+ getmonsterinfo(killedrid, MOB_NAME) +" at "+ strcharinfo(3); } else { if (rand(100) < .chance) getitem .s_rwd[0], .s_rwd[1]; .@announce_message$ = "[ System ] : Player ["+ strcharinfo(0) +"] has killed "+ getmonsterinfo(killedrid, MOB_NAME) +" alone at "+ strcharinfo(3); } MVPKills = MVPKills+1; dispbottom "---------------------------------------------------"; dispbottom "You killed a total of "+MVPKills+" MVP"+((MVPKills == 1)?"":"s")+"."; dispbottom "---------------------------------------------------"; } } addrid(0); if (#mvpon) { dispbottom .@announce_message$; } } end; } or - script #mvp_kill -1,{ OnInit: setarray .p_rwd, 607,1; // Party reward <item>,<amount> setarray .s_rwd, 607,1; // Solo reward <item>,<amount> .chance = 50; // Drop rate chances % // .gm = 10; // Prevents gm level and above to trigger the event // MVP Map list setarray .t_maps$[0],"moc_pryd06","lhz_dun03","gld2_prt","abbey02","ayo_dun02","lhz_dun04","ra_fild02","xmas_fild01","dic_dun02","beach_dun","iz_dun05","tur_dun04","lhz_dun02","jupe_core","moc_fild22","anthell02","odin_tem03","gon_dun03","gef_fild02","thana_boss","gef_fild10","ein_dun02","gef_fild14","moc_pryd04","dew_dun01","in_sphinx5","niflheim","moc_fild17","xmas_dun02","ice_dun03","kh_dun02","treasure02","moc_prydn2","pay_dun04","ra_san05","mosk_dun03","ama_dun03","thor_v03","gef_dun01","mjolnir_04","abyss_03","dic_dun03","prt_sewb4","pay_fild11","gef_dun02","gl_chyard","ra_fild03","ra_fild04","ve_fild01","ve_fild02","lou_dun03","prt_maze03","bra_dun02"; end; OnNPCKillEvent: //if (getgmlevel() >= .gm) end; // If gm = event wont happen if (strcharinfo(3) == instance_mapname("06guild_01") || strcharinfo(3) == instance_mapname("force_1-1")) end; if (getmonsterinfo(killedrid, MOB_MVPEXP)) { if (inarray(.t_maps$, strcharinfo(3)) != -1) { .@party_id = getcharid(1); if (.@party_id) { getpartymember .@party_id, 1; getpartymember .@party_id, 2; for (.@i = 0; .@i < $@partymembercount; .@i++) { if (isloggedin($@partymemberaid[.@i], $@partymembercid[.@i])) { .@partymemberaid[.@c] = $@partymemberaid[.@i]; .@c++; } } if (rand(100) < .chance) getitem .p_rwd[0], .p_rwd[1], .@partymemberaid[ rand(.@c) ]; .@announce_message$ = "[ System ] : Player ["+ strcharinfo(0) +"] of party ["+ strcharinfo(1) +"] has killed "+ getmonsterinfo(killedrid, MOB_NAME) +" at "+ strcharinfo(3); } else { if (rand(100) < .chance) getitem .s_rwd[0], .s_rwd[1]; .@announce_message$ = "[ System ] : Player ["+ strcharinfo(0) +"] has killed "+ getmonsterinfo(killedrid, MOB_NAME) +" alone at "+ strcharinfo(3); } MVPKills = MVPKills+1; dispbottom "---------------------------------------------------"; dispbottom "You killed a total of "+MVPKills+" MVP"+((MVPKills == 1)?"":"s")+"."; dispbottom "---------------------------------------------------"; addrid(2, 0, .@party_id); if (#mvpon) { dispbottom .@announce_message$; } } } end; }
  25. OnInit: OnHour00: .rand_time_1 = rand(0, 11); .rand_time_2 = rand(12, 23); OnMinute00: if (gettime(DT_HOUR) == .rand_time_1 || gettime(DT_HOUR) == .rand_time_2) { // scripts. } end;
×
×
  • Create New...