-
Posts
118 -
Joined
-
Last visited
-
Days Won
2
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Crowdfunding
Everything posted by namerpus18
-
Help, please make my script line shorter.
namerpus18 replied to namerpus18's question in Scripting Support
This method is something new to me, I am not quite familiar specially this "implode" thing so i will read about it and I will try this today. Thank you so much always -
Help, please make my script line shorter.
namerpus18 replied to namerpus18's question in Scripting Support
I am sorry, I also tried that method but the thing is inside the quote should be a <condition> can be any expression similar to the <condition> in the 'if' command. I am not quite sure if doing for inside it is really possible. Thank you OnInit: questinfo(QTYPE_QUEST),QMARK_YELLOW, "checkquest (11114,HUNTING) == 2 || checkquest (11115,HUNTING) == 2 || checkquest (11116,HUNTING) == 2 || checkquest (11117,HUNTING) == 2 || checkquest (11118,HUNTING) == 2 || checkquest (11119,HUNTING) == 2 || checkquest (11120,HUNTING) == 2 || checkquest (11121,HUNTING) == 2 || checkquest (11122,HUNTING) == 2 || checkquest (11123,HUNTING) == 2"; -
Good Day everyone, I just need some help, if someone can help me shorten this script. My methods are too limited and i cant find a way to shorten it. Does it improve if i manage to optimize this script? I feel that this script alone takes a lot of checking. Thank you so much, if(getmonsterinfo(killedrid, MOB_MVPEXP) > 1 && isbegin_quest(19000) > 0 || isbegin_quest(19001) > 0 || isbegin_quest(19002) > 0 || isbegin_quest(19003) > 0 || isbegin_quest(19004) > 0 || isbegin_quest(19005) > 0 || isbegin_quest(19006) > 0 || isbegin_quest(19007) > 0 || isbegin_quest(19008) > 0 || isbegin_quest(19009) > 0 || isbegin_quest(19010) > 0 || isbegin_quest(19011) > 0 || isbegin_quest(19012) > 0 || isbegin_quest(19013) > 0 || isbegin_quest(19014) > 0 || isbegin_quest(19015) > 0 || isbegin_quest(19016) > 0 || isbegin_quest(19017) > 0 || isbegin_quest(19018) > 0 || isbegin_quest(19019) > 0 ) { .... }
-
OnNPCKillEvent: if(getmonsterinfo(killedrid, MOB_MVPEXP) > 1) { setarray .@arrayofMVP[0], 1511, 1039, 1272, 1046, 1389, 1112, 1115, 1252, 1086, 1251, 1147, 1059, 1150, 1087, 1190, 1038, 1157, 1159, 1583, 1312; addrid(1); for( .@i = 0;.@i != getarraysize(.@arrayofMVP); .@i++ ) { .@j = .@arrayofnumbers[.@i]; switch(.@j) { case 1511: completequest (19000,getcharid(0)); break; case 1039: completequest (19001,getcharid(0)); break; ... ... ... } setquest (.@quest_id+20,getcharid(0)); end; Hello everyone, So I am doing a custom quest for every player within the map to complete each quest for MVP. This OnNPCKillEvent: is supposed to get RID of all players within the map and complete the quest. But I tried it with no error on the server but the quest is not completing when the MVP is killed. I dont know what I did wrong. Thank you so much for always. FOUND IT: .@j = .@arrayofnumbers[.@i];
-
oh yah, that makes sense. this saves me a lot. Thank you so much. for now i will finish my project with this. I still have my original plan on the other thread involving source code I will come back to that after i finish this. Thank you for your help and time EDIT1: so i tested it out and added something. I am so happy with the result maybe i will also add the map where the MVP really spawn. OnNPCKillEvent: if(getmonsterinfo(killedrid, MOB_MVPEXP) > 1) { if(killedrid == 1190 | isbegin_quest(19000) ==1) { //check if the MVP is Orc Lord addrid(1); changequest (19000,19001,getcharid(0)); end; } } end; }
-
I added timelimit to submit the quest. switch(1850,1190,......................){ //mobid case 1: completequest 19000,getcharid(0); //questid break; case 2 completequest 19010,getcharid(0); break; case 3; ... .... .... .... } I dunno if it will work but gonna try this one to check what MVP is killed and check if the player has the quest. Thank you so much.
-
The more I analyze my code the more I see a lot is missing . Like, check what map and mvp the player in and if the quest fit together. Or else any mvp will just complete the 1st quest.
-
Hi Harvin, I am just making a workaround to achieve a rewarding system for MVP. And kinda achieve it now, somehow :). I made 2 quests "hunt Orc Lord 1/2" and "hunt Orc Lord 2/2" Then if the mvp is killed in the map i will change the quest from 1/2 to 2/2 where you just need to talk to the npc for reward. Still, a lot to do like putting maps and MVP on VECTOR or ARRAY i think? OnNPCKillEvent: if(getmonsterinfo(killedrid, MOB_MVPEXP) > 1) { addrid(1); changequest (19000,19001,getcharid(0)); } end; } I am just being resourceful and trying to use anything available for me and made this. Sorry if it's too noob code but here it is. I still want to limit the quest for each MVP to 1 per day. prontera,169,180,4 script Commander#1 4_M_UNCLEKNIGHT,{ if (isbegin_quest(19001) == 0) { mes "You don't have the quest needed."; close; end; } if (checkquest (19001,PLAYTIME!=2,getcharid(0))){ mes "Time limit is finished."; close; end; } else if (checkquest (19001,PLAYTIME==0,getcharid(0))){ completequest (19001,getcharid(0)); getitem 7615,1; mes "Thank you."; close2; //.@quest$ + 1 emotion 15; end; } }
-
Hello again and again everyone, I just need some help regarding this custom quest I made where players need to slay an MVP. I have a problem though, the quest can only complete if the player is the MVP. What I want is to happen is , as long the player hit the mob(MVP) they can complete the quest. The player can only complete one quest for each MVP Monster. I don't know what should I change in the src script or make a floating npc. Thank you so much EDIT1: Hello, I saw this script and I think it will work to complete the quest for players within the map. Not quite sure if I need to do checking first if the char have the quest or just straight up put "completequest <ID>{,<char_id>};" there. (But at least I want that those who only damaged the mob(MVP) to complete the quest.)) Thank you - script boss_rewards -1,{ OnNPCKillEvent: if(getmonsterinfo(killedrid, MOB_MVPEXP) > 1) { addrid(1); completequest <ID>{,<char_id>}; } end; }
-
one last thing. So you mean I cannot pull out md->dmglog[i].id once the monster is dead right? EDIT: I am guessing i need to struct my own data handling somewhere in log.ccp which i think not possible right now for me. I grasping bit by bit by reading all related lines of several scripts, analyzing small parts that I understand and finding logic behind it. Thanks a lot
-
oh so data will disappear once the mob die unless i make a separate struct data? about putting it on db sql i still need to check on it if its not too complicated i might consider. and about this for loop do you think i can use it too? //found this on exp computation coz im finding a way to use tdmg so I can filter out IDs depending on their tdmg though im not sure if i can use it double per = (double)md->dmglog[i].dmg/(double)md->tdmg; ================= for(i = 0; i < DAMAGELOG_SIZE && md->dmglog[i].id; i++) { //can i filter out IDs based on md->tdmg here? //and at the same time give reward base on tdmg? //DAMAGELOG_SIZE is 30 so do i need to change it to 100+ if i want to log more IDs?? } Thank you so much you helped me so much, I am checking how to use vector now
-
Help me - Roulette have problem. Can't go to Lv 2
namerpus18 replied to GubA's question in Database Support
I dont think I understand, I mean why is the roulette using only bronze up to the last stage in my roulette? I don't know full mechanics yet, i am reading the src code but I am noob when it comes to src code so I am still dont get it. What i guess is bronze suppose to be for stage 1-2 or 3, silver for stage 4 or so then gold up to the last stage. But my roulette dont use silver or gold even its in laat stage -
Thanks man, appreciate it so much
-
Hello everyone, Can you guys help me where can I change this section here like a banner in cashshop. I can't find any script or in src code. Thank you so much,
-
Help me - Roulette have problem. Can't go to Lv 2
namerpus18 replied to GubA's question in Database Support
Hello, I applied the fix for the stage 1 stuck problem, do you have a fix for the silver and gold coins not working? Like the one of your video that silver coin is consumed when you are about stage 3 Thank you -
Yeah, bound items can stack right. Can't see a way to stack this, well not a big deal I guess but kinda messy in inventory I made it rental instead of bound because it is a trend to create an account and collect this freebie daily and I think in this way that trend is not possible to do. Thank you
-
Hello everybody, Is it possible to make a script this usables stack together? I am not quite sure if this needs to be edited within the source code or simply a script. Thank you so much always
-
Hello everyone, I just wanna ask for help if how I can limit account registration per IP. I camt find it anywhere here. Like you can only register 2 accounts per IP address... Sorry I am not sure which section to ask this but i am guessing here. Thank you so much
-
[SOLVED] Server is up without any error BUT....
namerpus18 replied to namerpus18's question in Client-side Support
I tried to remake everything and it is now working. Thank you SOLVED -
[SOLVED] Server is up without any error BUT....
namerpus18 replied to namerpus18's question in Client-side Support
I open the server 6900 is closed, 5121 open,6121 open -
I will read about using vector, thank you. I am still new.
-
That's quite what I want to achieve. But to tell you what it is exactly, I want to reward all IDs who met a dealt total damage(example: 100,000 dealt total damage) to the MVP aside from MVP reward for top1,top2, and top3. Of course, I need to adjust MVP's HP maybe up to x100 if there are more than 500 players participating. EDIT: Actually I think this 'mvplog' thing will do the trick but I need to learn first how to use it coz I don't know yet about functions from SQL.
-
Good day everyone, I am currently trying to make a server online thru google VPS, I managed to make it running so far but can't connect to it. Already tried different configs out there. I can't see the problem because it seems to be working but I cannot connect. Thank you guys. SUBNET_ATHENA: subnet: 255.255.255.0:"VPS WAN IP":"VPS WAN IP" CHAR_CONF login_ip: 127.0.0.1 char_ip: "VPS WAN IP" INTER_CONF // MySQL Login server login_server_ip: 127.0.0.1 login_server_port: 3306 login_server_id: "USER" login_server_pw: "PASS" login_server_db: ragnarok login_codepage: login_case_sensitive: no ipban_db_ip: 127.0.0.1 ipban_db_port: 3306 ipban_db_id: "USER" ipban_db_pw: "PASS" ipban_db_db: ragnarok ipban_codepage: // MySQL Character server char_server_ip: 127.0.0.1 char_server_port: 3306 char_server_id: "USER" char_server_pw: "PASS" char_server_db: ragnarok // MySQL Map Server map_server_ip: 127.0.0.1 map_server_port: 3306 map_server_id: "USER" map_server_pw: "PASS" map_server_db: ragnarok // MySQL Web Server web_server_ip: 127.0.0.1 web_server_port: 3306 web_server_id: "USER" web_server_pw: "PASS" web_server_db: ragnarok // MySQL Log Database log_db_ip: 127.0.0.1 log_db_port: 3306 log_db_id: "USER" log_db_pw: "PASS" log_db_db: ragnarok log_codepage: log_login_db: loginlog MAP_CONF char_ip: 127.0.0.1 map_ip: "VPS WAN IP" SCLIENT: <?xml version="1.0" encoding="euc-kr" ?> <clientinfo> <desc>Ragnarok Client Information</desc> <servicetype>korea</servicetype> <servertype>primary</servertype> <connection> <display>Local</display> <address>"VPS WAN IP"</address> <port>6900</port> <version>55</version> <langtype>0</langtype> <registrationweb>www.ragnarok.com</registrationweb> <loading> <image>loading00.jpg</image> <image>loading01.jpg</image> <image>loading02.jpg</image> <image>loading03.jpg</image> <image>loading04.jpg</image> <image>loading05.jpg</image> <image>loading06.jpg</image> </loading> </connection> </clientinfo> rAthena is starting... (c) 2021 rAthena Project checking... Check complete. Looks like a good, nice rAthena! Logging is disabled Server 'login-server' started at 08-16-22:52-29 Server 'char-server' started at 08-16-22:52-29 [Status]: Memory manager initialised: log/login-server.leaks [Status]: Memory manager initialised: log/char-server.leaks rAthena Development Team presents ___ __ __ _____/ | / /_/ /_ ___ ____ ____ _ / ___/ /| |/ __/ __ \/ _ \/ __ \/ __ `/ / / / ___ / /_/ / / / __/ / / / /_/ / /_/ /_/ |_\__/_/ /_/\___/_/ /_/\__,_/ http://rathena.org/board/ [Info]: Git Hash: 'd4c7614d80bca48cf1b829afef5be4aee45b16a4' rAthena Development Team presents ___ __ __ _____/ | / /_/ /_ ___ ____ ____ _ / ___/ /| |/ __/ __ \/ _ \/ __ \/ __ `/ / / / ___ / /_/ / / / __/ / / / /_/ / /_/ /_/ |_\__/_/ /_/\___/_/ /_/\__,_/ http://rathena.org/board/ [Info]: Git Hash: 'd4c7614d80bca48cf1b829afef5be4aee45b16a4' [Info]: Server uses 'select' as event dispatcher Server 'map-server' started at 08-16-22:52-29 [Info]: Server supports up to '1024' concurrent connections. [Status]: Login server binding IP address : 127.0.0.1 -> 127.0.0.1 [Info]: Finished reading conf/import/inter_conf.txt. [Info]: Finished reading conf/inter_athena.conf. [Info]: Finished reading conf/import/login_conf.txt. [Info]: Finished reading conf/login_athena.conf. [Info]: Done reading '23' messages in 'conf/msg_conf/login_msg.conf'. [Info]: Server uses 'select' as event dispatcher [Info]: Server supports up to '1024' concurrent connections. [Status]: Login server IP address : 127.0.0.1 -> 127.0.0.1 [Status]: Character server IP address : 35.213.XXX.XX -> 35.213.XXX.XX Server 'web-server' started at 08-16-22:52-29 rAthena was started. [Status]: Login server IP address : 127.0.0.1 -> 127.0.0.1 [Status]: Character server IP address : 35.213.XXX.XX -> 35.213.XXX.XX [Info]: Done reading conf/import/char_conf.txt. [Info]: Done reading conf/char_athena.conf. [Info]: Done reading conf/import/inter_conf.txt. [Info]: Done reading conf/inter_athena.conf. annie12@instance-1:~/rathena$ [Info]: Done reading '169' messages in 'conf/msg_conf/char_msg.conf'. [Info]: Done reading conf/import/inter_conf.txt. [Info]: Done reading conf/inter_athena.conf. [Info]: Connect Character DB server.... (Character Server) [Status]: Memory manager initialised: log/web-server.leaks rAthena Development Team presents ___ __ __ _____/ | / /_/ /_ ___ ____ ____ _ / ___/ /| |/ __/ __ \/ _ \/ __ \/ __ `/ / / / ___ / /_/ / / / __/ / / / /_/ / /_/ /_/ |_\__/_/ /_/\___/_/ /_/\__,_/ http://rathena.org/board/ [Info]: Git Hash: 'd4c7614d80bca48cf1b829afef5be4aee45b16a4' [Info]: Server uses 'select' as event dispatcher [Info]: Server supports up to '1024' concurrent connections. [Info]: Finished reading conf/import/web_conf.txt. [Info]: Finished reading conf/web_athena.conf. [Info]: Done reading '0' messages in 'conf/msg_conf/web_msg.conf'. [Info]: Done reading conf/import/inter_conf.txt. [Info]: Done reading conf/inter_athena.conf. [Info]: Connecting to the Login DB server..... [Status]: Connect success! (Login Server Connection) [Info]: Connecting to the Char DB server..... [Status]: Loading '1' entries in 'conf/inter_server.yml' [Status]: Done reading '1' entries in 'conf/inter_server.yml' [Status]: Connect success! (Char Server Connection) [Info]: Connecting to the Map DB server..... [Status]: Loading '49' entries in 'db/pre-re/exp_guild.yml' [Status]: Done reading '49' entries in 'db/pre-re/exp_guild.yml' [Info]: Ipban connection made. [Info]: Clan loaded (1 - Swordman Clan) [Info]: Clan loaded (2 - Arcwand Clan) [Info]: Clan loaded (3 - Golden Mace Clan) [Info]: Clan loaded (4 - Crossbow Clan) [Status]: The login-server is ready (Server is listening on the port 6900). [Status]: Connect success! (Map Server Connection) [Info]: Connecting to the Web DB server..... [Status]: Finished Reading GeoIP Database. [Status]: Characters per Account: '0'. [Info]: Start checking DB integrity [Status]: Memory manager initialised: log/map-server.leaks rAthena Development Team presents ___ __ __ _____/ | / /_/ /_ ___ ____ ____ _ / ___/ /| |/ __/ __ \/ _ \/ __ \/ __ `/ / / / ___ / /_/ / / / __/ / / / /_/ / /_/ /_/ |_\__/_/ /_/\___/_/ /_/\__,_/ http://rathena.org/board/ [Info]: Git Hash: 'd4c7614d80bca48cf1b829afef5be4aee45b16a4' [Status]: Connect success! (Web Server Connection) [Status]: Starting server... [Debug]: Web server not running, sleeping 1 second. [Info]: Server uses 'select' as event dispatcher [Info]: DB integrity check finished with success [Status]: The char-server is ready (Server is listening on the port 6121). [Info]: Server supports up to '1024' concurrent connections. [Info]: Char Server IP Address : '127.0.0.1' -> '127.0.0.1'. [Info]: Map Server IP Address : '35.213.XXX.XX' -> '35.213.XXX.XX'. [Info]: Char Server IP Address : '127.0.0.1' -> '127.0.0.1'. [Info]: Map Server IP Address : '35.213.XXX.XX' -> '35.213.XXX.XX'. [Status]: Using SQL dbs: yes [Info]: Logging item transactions to table 'picklog'. [Info]: Logging commands to table 'atcommandlog'. [Info]: Logging 'logmes' messages to table 'npclog'. [Info]: Logging Cash transactions to table 'cashlog'. [Info]: Logging Feeding items to table 'feedinglog'. [Info]: Connecting to the Map DB Server.... [Status]: Connect success! (Map Server Connection) [Info]: [SQL]: Connecting to the Log Database ragnarok At 127.0.0.1... [Status]: [SQL]: Successfully 'connected' to Database 'ragnarok'. [Status]: Loading maps (using db/import/map_cache.dat as map cache)... [Status]: Loading maps (using db/pre-re/map_cache.dat as map cache)... [Status]: Loading maps (using db/map_cache.dat as map cache)... [Status]: Loading 1179 maps. [Info]: Successfully loaded '1179' maps. [Info]: Done reading '0' messages in 'conf/msg_conf/import/map_msg_eng_conf.txt'. [Info]: Done reading '1271' messages in 'conf/msg_conf/map_msg.conf'. [Status]: Loading '220' entries in 'conf/atcommands.yml' [Status]: Done reading '220' entries in 'conf/atcommands.yml' [Status]: Loading '4' entries in 'db/pre-re/instance_db.yml' [Status]: Done reading '4' entries in 'db/pre-re/instance_db.yml' [Status]: Using packet version: 20190605. [Status]: Packet Obfuscation: Enabled. Keys: 0x00000000, 0x00000000, 0x00000000 [Status]: Loading '5' entries in 'db/const.yml' [Status]: Done reading '5' entries in 'db/const.yml' [Status]: Loading '6170' entries in 'item_db' [Status]: Done reading '6170' entries in 'item_db'. [Status]: Loading '64' entries in 'item_db2' [Status]: Done reading '64' entries in 'item_db2'. [Warning]: Item Ahura_Mazda (2199) is a shield and should have a view id. Defaulting to Guard... [Warning]: Item Tuxedo is an armor, but does not have an armor level. Consider adding it. Defaulting to 1. [Status]: Done reading '19' entries in 'db/pre-re/item_noequip.txt'. [Status]: Done reading '0' entries in 'db/import/item_noequip.txt'. [Info]: Attempt to connect to login-server... [Status]: Connecting to 127.0.0.1:6900 [Info]: Connection request of the char-server 'rAthena' @ 35.213.XXX.XX:6121 (account: 'qwer', ip: '127.0.0.1') [Notice]: Authentication accepted (account: qwer, id: 1, ip: 127.0.0.1) [Status]: Connection of the char-server 'rAthena' accepted. [Status]: Connected to login-server (connection #5). [Status]: Awaiting maps from map-server. [Status]: The web-server is ready (Server is listening on the port 8888). [Status]: Loading '63' entries in 'db/pre-re/item_group_db.yml' ... [Status]: Done loading '0' entries for '0' NPC Markets from 'market' table. [Status]: Loading NPCs... [Info]: Done loading '13035' NPCs: -'3095' Warps -'187' Shops -'9753' Scripts -'3911' Spawn sets -'40470' Mobs Cached -'0' Mobs Not Cached [Status]: Event 'OnInit' executed with '1469' NPCs. [Status]: Server is 'ready' and listening on port '5121'. [Status]: Attempting to connect to Char Server. Please wait. [Status]: Connecting to 127.0.0.1:6121 [Status]: Logging in to char server... [Status]: Successfully logged on to Char Server (Connection: '7'). [Status]: Sending maps to char server... [Status]: Event 'OnInterIfInit' executed with '0' NPCs. [Status]: Event 'OnInterIfInitOnce' executed with '0' NPCs. [Status]: Requested '34' guild castles from char-server... [Status]: Map-Server 0 connected: 1179 maps, from IP 35.213.XXX.XX port 5121. [Status]: Map-server 0 loading complete. [Info]: Loaded guild castle (33 - guild 0) ... [Info]: Loaded guild castle (28 - guild 0) [Status]: Map-server connected to char-server 'rAthena' (whispername: Server). [Status]: Map Server is now online. [Info]: Received Fame List of '0' characters. [Status]: Received '34' guild castles from char-server. [Status]: Received '4' clans from char-server.
-
I have checked it and kinda understand it but not fully as I am not yet familiar to sql structures or parameters but I think its kinda straight forward. From what i see 'mvplog' is a function right? And inside the parentheses are its parameters? Uhm regarding the script I made above does it make sense? I just want to know if i understand a little now about source code editing. coz pointers realy confused me most of the time and giving me hard time always. EDIT. is there something i can lookup in source code that uses this 'mvplog'? just to figure how to use it Thanks a lot
-
//===============SOURCE CODE REFERENCE============= void mob_add_spotted(struct mob_data *md, uint32 char_id) { int i; //Check if char_id is already logged for (i = 0; i < DAMAGELOG_SIZE; i++) { if (md->spotted_log[i] == char_id) return; } //Not logged, add char_id to first empty slot for (i = 0; i < DAMAGELOG_SIZE; i++) { if (md->spotted_log[i] == 0) { md->spotted_log[i] = char_id; return; } } } //==========CODE I MAKE FROM REFERENCE ABOVE void mob_add_atker(struct mob_data *md, uint32 char_id) { int i; //Check if char_id is already logged for (i = 0; i < DAMAGELOG_SIZE; i++) { if (md->dmglog[i] == char_id) return; } //Not logged, add char_id to first empty slot for (i = 0; i < DAMAGELOG_SIZE; i++) { if (md->dmglog[i] == 0) { md->dmglog[i] = char_id; return; } } } Good day everyone, I am new and still learning in source code and I want to try to make something for my project using lines from the source code itself. What I am trying to achieve here is to log char IDs of all those who attacked the monster(MVP). I am focusing this one before proceeding to the next step. Did I make it right? Thank you so much as always, EDITED: Or should I use this one? from pc.ccp void pc_damage_log_add(map_session_data *sd, int id) { uint8 i = 0; if (!sd || !id) return; //Only store new data, don't need to renew the old one with same id ARR_FIND(0, DAMAGELOG_SIZE_PC, i, sd->dmglog[i] == id); if (i < DAMAGELOG_SIZE_PC) return; for (i = 0; i < DAMAGELOG_SIZE_PC; i++) { if (sd->dmglog[i] == 0) { sd->dmglog[i] = id; return; } } }