-
Posts
1677 -
Joined
-
Last visited
-
Days Won
71
Community Answers
-
sader1992's post in Freebies Gepard (UniqueID) was marked as the answer
if you are planing to use the unique id more in the future , i would suggest using this
the script would look like this
prontera,0,0,0 script rewards 444,{ mes "something"; if(!gepard_int_get("freebies")){ gepard_int_set("freebies",1); mes "here is the rewards"; getitem 502,1; }else{ mes "you already got the freebies rewards"; } close; }
-
sader1992's post in auto delete castle data was marked as the answer
- script reset_castle_data -1,{ OnFri2130: //on Friday 9:30 PM , edit this to what you want. .@castle$ = ""; //input the guild castle name (map name like "gefg_cas01"). .@guildID = 0; //if the script didn't work , try to change this to a guild id owned by you. for(.@i = (CD_NONE+1); .@i < (CD_MAX-1); .@i++){ if(.@i == CD_GUILD_ID){ setcastledata .@castle$,.@i,.@guildID; }else{ setcastledata .@castle$,.@i,0; } } end; }
-
sader1992's post in Make cursed flame effect with specialeffect command was marked as the answer
i didn't read the full topic , so i would answer only this question , i don't know if any other question is asked
if you mean like this
it can be done like this
- script ::NPC_UNIQUE_NAME8765643433 444,13,13,{ end; OnInit: hideonnpc strnpcinfo(3); end; OnTouch: specialeffect 696,SELF; end; } prontera,160,127,4 duplicate(NPC_UNIQUE_NAME8765643433) #no1 444,13,13 prontera,160,129,4 duplicate(NPC_UNIQUE_NAME8765643433) #no2 444,13,13 prontera,160,131,4 duplicate(NPC_UNIQUE_NAME8765643433) #no3 444,13,13 prontera,160,133,4 duplicate(NPC_UNIQUE_NAME8765643433) #no4 444,13,13 prontera,160,135,4 duplicate(NPC_UNIQUE_NAME8765643433) #no5 444,13,13 prontera,160,137,4 duplicate(NPC_UNIQUE_NAME8765643433) #no6 444,13,13 prontera,160,139,4 duplicate(NPC_UNIQUE_NAME8765643433) #no7 444,13,13 prontera,160,141,4 duplicate(NPC_UNIQUE_NAME8765643433) #no8 444,13,13 prontera,160,143,4 duplicate(NPC_UNIQUE_NAME8765643433) #no9 444,13,13 prontera,151,127,4 duplicate(NPC_UNIQUE_NAME8765643433) #no11 444,13,13 prontera,151,129,4 duplicate(NPC_UNIQUE_NAME8765643433) #no12 444,13,13 prontera,151,131,4 duplicate(NPC_UNIQUE_NAME8765643433) #no13 444,13,13 prontera,151,133,4 duplicate(NPC_UNIQUE_NAME8765643433) #no14 444,13,13 prontera,151,135,4 duplicate(NPC_UNIQUE_NAME8765643433) #no15 444,13,13 prontera,151,137,4 duplicate(NPC_UNIQUE_NAME8765643433) #no16 444,13,13 prontera,151,139,4 duplicate(NPC_UNIQUE_NAME8765643433) #no17 444,13,13 prontera,151,141,4 duplicate(NPC_UNIQUE_NAME8765643433) #no18 444,13,13 prontera,151,143,4 duplicate(NPC_UNIQUE_NAME8765643433) #no19 444,13,13
-
sader1992's post in @whosell was marked as the answer
try this
/*========================================== * @whosell - List who is vending the item (amount, price, and location). * revamped by VoidLess, original by zephyrus_cr *------------------------------------------*/ ACMD_FUNC(whosell) { char item_name[100]; int item_id = 0, j, count = 0, sat_num = 0; int s_type = 1; // search bitmask: 0-name,1-id, 2-card, 4-refine int refine = 0,card_id = 0; bool flag = 1; // place dot on the minimap? struct map_session_data* pl_sd; struct s_mapiterator* iter; unsigned int MinPrice = battle_config.vending_max_value, MaxPrice = 0; struct item_data *item_data; static char atcmd_output[CHAT_SIZE_MAX]; if (!*message) { clif_displaymessage(fd, "Use: @whosell <item_id> or @whosell <name>"); return -1; } if (sscanf(message, "+%d %d[%d]", &refine, &item_id, &card_id) == 3){ s_type = 1+2+4; } else if (sscanf(message, "+%d %d", &refine, &item_id) == 2){ s_type = 1+4; } else if (sscanf(message, "+%d [%d]", &refine, &card_id) == 2){ s_type = 2+4; } else if (sscanf(message, "%d[%d]", &item_id, &card_id) == 2){ s_type = 1+2; } else if (sscanf(message, "[%d]", &card_id) == 1){ s_type = 2; } else if (sscanf(message, "+%d", &refine) == 1){ s_type = 4; } else if (sscanf(message, "%d", &item_id) == 1 && item_id == atoi(message)){ s_type = 1; } else if (sscanf(message, "%99[^\n]", item_name) == 1){ s_type = 1; if ((item_data = itemdb_searchname(item_name)) == NULL){ clif_displaymessage(fd, "Not found item with this name"); return -1; } item_id = item_data->nameid; } else { clif_displaymessage(fd, "Use: @whosell <item_id> or @whosell <name>"); return -1; } //check card if(s_type & 2 && ((item_data = itemdb_exists(card_id)) == NULL || item_data->type != IT_CARD)){ clif_displaymessage(fd, "Not found a card with than ID"); return -1; } //check item if(s_type & 1 && (item_data = itemdb_exists(item_id)) == NULL){ clif_displaymessage(fd, "Not found an item with than ID"); return -1; } //check refine if(s_type & 4){ if (refine<0 || refine>10){ clif_displaymessage(fd, "Refine out of bounds: 0 - 10"); return -1; } /*if(item_data->type != IT_WEAPON && item_data->type != IT_ARMOR){ clif_displaymessage(fd, "Use refine only with weapon or armor"); return -1; }*/ } iter = mapit_getallusers(); for (pl_sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); pl_sd = (TBL_PC*)mapit_next(iter)) { if (pl_sd->vender_id ) { // check if player is vending for (j = 0; j < pl_sd->vend_num; j++) { if ((item_data = itemdb_exists(pl_sd->cart.u.items_cart[pl_sd->vending[j].index].nameid)) == NULL) continue; if(s_type & 1 && pl_sd->cart.u.items_cart[pl_sd->vending[j].index].nameid != item_id) continue; if(s_type & 2 && ((item_data->type != IT_ARMOR && item_data->type != IT_WEAPON) || (pl_sd->cart.u.items_cart[pl_sd->vending[j].index].card[0] != card_id && pl_sd->cart.u.items_cart[pl_sd->vending[j].index].card[1] != card_id && pl_sd->cart.u.items_cart[pl_sd->vending[j].index].card[2] != card_id && pl_sd->cart.u.items_cart[pl_sd->vending[j].index].card[3] != card_id))) continue; if(s_type & 4 && ((item_data->type != IT_ARMOR && item_data->type != IT_WEAPON) || pl_sd->cart.u.items_cart[pl_sd->vending[j].index].refine != refine)) continue; if(item_data->type == IT_ARMOR) snprintf(atcmd_output, CHAT_SIZE_MAX, "+%d %s[%d] | Price %ud | Amount %d | %s[%d,%d] | %s",pl_sd->cart.u.items_cart[pl_sd->vending[j].index].refine ,item_data->jname ,pl_sd->cart.u.items_cart[pl_sd->vending[j].index].card[0] ,pl_sd->vending[j].value ,pl_sd->vending[j].amount ,mapindex_id2name(pl_sd->mapindex) ,pl_sd->bl.x,pl_sd->bl.y ,pl_sd->message); else if(item_data->type == IT_WEAPON) snprintf(atcmd_output, CHAT_SIZE_MAX, "+%d %s[%d,%d,%d,%d] | Price %ud | Amount %d | %s[%d,%d] | %s",pl_sd->cart.u.items_cart[pl_sd->vending[j].index].refine ,item_data->jname ,pl_sd->cart.u.items_cart[pl_sd->vending[j].index].card[0] ,pl_sd->cart.u.items_cart[pl_sd->vending[j].index].card[1] ,pl_sd->cart.u.items_cart[pl_sd->vending[j].index].card[2] ,pl_sd->cart.u.items_cart[pl_sd->vending[j].index].card[3] ,pl_sd->vending[j].value ,pl_sd->vending[j].amount ,mapindex_id2name(pl_sd->mapindex) ,pl_sd->bl.x,pl_sd->bl.y ,pl_sd->message); else snprintf(atcmd_output, CHAT_SIZE_MAX, "%s | Price %ud | Amount %d | %s[%d,%d] | %s",item_data->jname ,pl_sd->vending[j].value ,pl_sd->vending[j].amount ,mapindex_id2name(pl_sd->mapindex) ,pl_sd->bl.x, pl_sd->bl.y ,pl_sd->message); if(pl_sd->vending[j].value < MinPrice) MinPrice = pl_sd->vending[j].value; if(pl_sd->vending[j].value > MaxPrice) MaxPrice = pl_sd->vending[j].value; clif_displaymessage(fd, atcmd_output); count++; flag = 1; } if (flag && pl_sd->mapindex == sd->mapindex) { clif_viewpoint(sd, 1, 1, pl_sd->bl.x, pl_sd->bl.y, ++sat_num, 0xFFFFFF); flag = 0; } } } mapit_free(iter); if(count > 0) { snprintf(atcmd_output, CHAT_SIZE_MAX, "================== Found %d entries. ==================", count, MinPrice, MaxPrice); clif_displaymessage(fd, atcmd_output); } else clif_displaymessage(fd, "Nobody is selling it now."); return 0; }
-
sader1992's post in Help!! tcg drop on mvp limit was marked as the answer
- script MvP_Kill -1,{ OnNPCKillEvent: .@checkmvp = compare(.MvPID$,""+killedrid); if( .@checkmvp ) { if( !.Chance || (.Chance && .Chance > rand(10000)) ) if(.limit > .limit_drop){ getitem .Reward, 1; .limit_drop++; } } end; OnClock0000: .limit_drop = 0; end; OnInit: .limit = 100; //100 drop per day .Chance = 1000; // 1000 = 10%, 0 = turn off chance drop mode, 100% drop .MvPID$ = "1511,1734,1492,1647,1785,1630,1399,1039,1874,"+ "1251,2068,1272,1719,1046,1389,1112,1115,1957,1418,1871,1252,1768,"+ "1086,1688,1646,1373,1147,1059,1150,1956,2022,1087,"+ "1190,1038,1157,1159,1502,1623,1650,1583,"+ "1708,1312,1751,1685,1648,1917,1658"; // MvP Ids .Reward = 7227; // Reward Item ID end; }
-
sader1992's post in How to fix "Failed to connect to server" was marked as the answer
make sure the packet version is current
make sure the ports are open
make sure the ip of each program
like this
conf/import/char_conf.txt login_ip: 127.0.0.1 char_ip: public_ip conf/import/map_conf.txt char_ip: 127.0.0.1 map_ip: public_ip make sure to check your clientinfo xml file
check your subnet config
and
-
sader1992's post in Prize for the first 50 was marked as the answer
mac ?
if you have GePard
this should work
prontera,0,0,0 script qqqqqq 444,{ if(inarray($UNIQUEIDLIST_REWARDS1$,get_unique_id()) == -1 && inarray($IPLIST_REWARDS1$,getcharip()) == -1 ){ if($REWARDS1 < 50){ //the rewards here! //------------ getitem 502,1; //------------ $UNIQUEIDLIST_REWARDS1$[getarraysize($UNIQUEIDLIST_REWARDS1$)] = get_unique_id(); $IPLIST_REWARDS1$[getarraysize($IPLIST_REWARDS1$)] = getcharip(); $REWARDS1++; mes "you got the reward"; end; } mes "you missed the reward";//50 player already got the reward end; } mes "you already got the reward"; end; }
-
sader1992's post in PVP POINTS SYSTEM was marked as the answer
- script pvp_points -1,{ OnPCKillEvent: if(killedrid == getcharid(3)) end; for(.@i=0;.@i<.s;.@i++){ if(getmapflag(strcharinfo(3),.m[.@i])){ .@battle_map = true; } } if(!.@battle_map) end; PVPPOINTSYSTEM++; end; OnInit: setarray .m,mf_pvp,mf_pvp_noparty,mf_pvp_noguild,mf_gvg,mf_gvg_noparty; .s = getarraysize(.m); end; } //if you don't want a shop remove the next line. prontera,0,0,0 pointshop PVP_POINT_SHOP 444,PVPPOINTSYSTEM,512:1,502:50;//ADD MORE IF YOU WANT //ADD MAP ,X ,Y ,NPC NAME ,NPC LOOK AS YOU WANT
-
sader1992's post in help delequip was marked as the answer
EQI_SHOES (2) - Footgear (shoes, boots) EQI_COMPOUND_ON (-1) - Item slot that calls this script (In context of item script) EQI_ACC_L (0) - Accessory 1 EQI_ACC_R (1) - Accessory 2 EQI_SHOES (2) - Footgear (shoes, boots) EQI_GARMENT (3) - Garment (mufflers, hoods, manteaux) EQI_HEAD_LOW (4) - Lower Headgear (beards, some masks) EQI_HEAD_MID (5) - Middle Headgear (masks, glasses) EQI_HEAD_TOP (6) - Upper Headgear EQI_ARMOR (7) - Armor (jackets, robes) EQI_HAND_L (8) - Left hand (weapons, shields) EQI_HAND_R (9) - Right hand (weapons) EQI_COSTUME_HEAD_TOP (10) - Upper Costume Headgear EQI_COSTUME_HEAD_MID (11) - Middle Costume Headgear EQI_COSTUME_HEAD_LOW (12) - Lower Costume Headgear EQI_COSTUME_GARMENT (13) - Costume Garment EQI_AMMO (14) - Arrow/Ammunition EQI_SHADOW_ARMOR (15) - Shadow Armor EQI_SHADOW_WEAPON (16) - Shadow Weapon EQI_SHADOW_SHIELD (17) - Shadow Shield EQI_SHADOW_SHOES (18) - Shadow Shoes EQI_SHADOW_ACC_R (19) - Shadow Accessory 2 EQI_SHADOW_ACC_L (20) - Shadow Accessory 1 i don't see where you are deleting the weapon
2 = shoes
4 = low headgear
if(getequipid(2) == .@iEquip) delequip(2); message strcharinfo(0),"your "+getitemname(.@iEquip)+" break!!"; if(getequipid(4) == .@iEquip) delequip(4); message strcharinfo(0),"your "+getitemname(.@iEquip)+" break!!"; you can use the const variable with the command so you don't get lost
like delequip(EQI_HAND_R);
(also your if statement will ignore the message , the message will play anyway cut there is no {} )
-
sader1992's post in How important is 'ClassNum' field in iteminfo.lub? was marked as the answer
on the character selection , the view id come from the server
after that inside the game the view id come from the lua files
to put high view id in the client , you need to patch your client to allow that , use nemo for that
-
sader1992's post in Change the sub menu language from application.php to the langauge file was marked as the answer
https://github.com/rathena/FluxCP/pull/243/files
-
sader1992's post in About Cash Shop from SQL was marked as the answer
to use sql , you need to switch everything to sql
including item_db
https://github.com/rathena/rathena/blob/08d160aaac8cdd286bbafb32532abe42b8a42376/conf/inter_athena.conf#L154
else , you can try src edit https://github.com/rathena/rathena/blob/08d160aaac8cdd286bbafb32532abe42b8a42376/src/map/cashshop.cpp#L434
to
//if( db_use_sqldbs ){ cashshop_read_db_sql(); //} else { // cashshop_read_db_txt(); //} however , never tested it , don't know if there is something else you should change or not to work
-
sader1992's post in Cannot enter on Mapa server was marked as the answer
conf/import/char_conf.txt login_ip: 127.0.0.1 char_ip: vps_ip conf/import/map_conf.txt char_ip: 127.0.0.1 map_ip: vps_ip
-
sader1992's post in Check Partymembers status was marked as the answer
i think you already got the answer in discord, however this is the answer if someone wanted it
getpartymember getcharid(1),0,.@name$[0]; getpartymember getcharid(1),1,.@charid[0]; getpartymember getcharid(1),2,.@accid[0]; for(.@i=0;.@i<getarraysize(.@name$[0]);.@i++){ if(isloggedin(.@accid[.@i],.@charid[.@i])){ if(.@state = checkvending(.@name$[.@i])){ if (.@state&1) mes .@name$[.@i] + " is currently vending!"; if (.@state&4) mes .@name$[.@i] + " has a buying store!"; if (.@state&2) mes .@name$[.@i] + " is autotrading!"; .@someone_vinding = true; } } } if(.@someone_vinding) end;
-
sader1992's post in Title as a Quest Reward was marked as the answer
create an achievement , and add the title to it as a reward
use "achievementcomplete(<achievement id>{,<char id>})"
now the player have the title
-
sader1992's post in deactivate return save point second death was marked as the answer
try the mapflag
'pvp_nocalcrank' will disable calculation of PvP rankings.
-
sader1992's post in Free Potions Once a Day was marked as the answer
izlude,144,121,3 script JohnDoe NPC::JohnDoe 1_M_MERCHANT,{ mes "[JohnDoe]"; mes "Do you need some Novice Potions?"; switch(select("Yes, please.:I don't need them for now, thank you.")){ clear; case 1: .@TIME$ = "" + gettime(DT_YYYYMMDD); if(#JOHNDOE_DAILY$ == .@TIME$){ mes "you already got the Novice Potions for today"; mes "try again in the next day"; end; } mes "Here, take these."; getitem 569,250; #JOHNDOE_DAILY$ = .@TIME$; mes "Good luck!."; end; case 2: mes "Okay, good luck!"; end; } }
-
sader1992's post in Help> BULK POTION BREWER was marked as the answer
the chance logic was incorrect btw
if(rand(1,5) == 3) // this mean the chance is 1/5
if(rand(1,5) <= 3) // this mean the chance is 3/5
leave the mac quantity 250 or add sleep in the loop if you know what i mean
prontera,164,171,4 script Potion Brewer 893,{ mes "[Potion Brewer Alisa]"; mes "Hello, "+strcharinfo(0)+"!"; mes "How may I help you?"; next; switch (select("Brew Grenade:Brew Acid:")) { case 1: input .@quantity; if(.@quantity > 250){ mes "the max quantity you can do at once is 250"; end; } clear; if (countitem(713) < .@quantity || countitem(970) < .@quantity || countitem(1059) < .@quantity ) { mes "You're lacking of requirements."; close; } for(.@i=0;.@i<.@quantity;.@i++){ if(rand(1,5) <= 3) { .@count++; } } delitem 713,.@quantity; delitem 970,.@quantity; delitem 1059,.@quantity; getitem 7135,.@count; end; } end; }
-
sader1992's post in Random Menu Selection was marked as the answer
setarray .@gqname$[0],"Kill Mantis","Kill Bees","Kill Soils","Kill Porings"; .@null$ = "NULL"; while(countinarray(.@gqname$[0], .@null$) != 2) .@gqname$[rand(getarraysize(.@gqname$))] = .@null$; switch(select(replacestr(implode(.@gqname$, ":"), .@null$, ""))) { case 1: mes("mantis"); close; case 2: mes("bees"); close; case 3: mes("soils"); close; case 4: mes("porings."); close; }
-
sader1992's post in Mob counter / record was marked as the answer
prontera,0,0,0 script poring_count 444,{ .@rank = query_sql("SELECT `char_id`,`char_name`,`kills` FROM `poring_kill_rank` where `kills` > '0' order by `kills` DESC", .@charid,.@name$,.@kills); .@ndx = inarray(.@name$, strcharinfo(0)); if(inarray(.@name$, strcharinfo(0)) != -1){ mes "^0024E8[YOU] :^000000 (" + (.@ndx +1) + ") : " + .@kills[.@ndx] + " Poring Kills"; } mes "[TOP 10] :"; for(.@i=0;.@i<min(.@rank,9);.@i++){ mes (.@i + 1) + " ^0024E8" + .@name$[.@i] + "^000000 ^FF0000" + .@kills[.@i] + "^000000 Poring Kills."; } end; OnNPCKillEvent: if(killedrid == 1002){ query_sql("SELECT `kills` FROM `poring_kill_rank` WHERE `char_id` = '" + getcharid(0) + "'", .@kills); if(.@kills){ query_sql("UPDATE `poring_kill_rank` SET `kills` = '" + ++.@kills +"' WHERE `char_id` = '" + getcharid(0) + "'"); }else{ query_sql("INSERT INTO `poring_kill_rank` (`char_id`,`char_name`,`kills`) VALUES ('" + getcharid(0) + "','" + strcharinfo(0) + "','" + ++.@kills + "')"); } } end; OnInit: query_sql("CREATE TABLE IF NOT EXISTS `poring_kill_rank` (`char_id` INT NOT NULL,`char_name` VARCHAR(30) NOT NULL,`kills` INT NOT NULL) ENGINE=MyISAM"); } to reset, just remove all the entries in poring_kill_rank table
-
sader1992's post in Guild Quests was marked as the answer
you can create a global variable with the index of the guild id
like
OnMonsterDead: if(getcharid(2) && $GLOBALGUILDQUEST[getcharid(2)]){ $GLOBALGUILDQUESTCOUNT[getcharid(2)]++; } end; //$GLOBALGUILDQUEST is a variable true or falce to check if the guild have the quest or not , normally just set it to true when they take the quest and false when they are done //$GLOBALGUILDQUESTCOUNT is variable for the kill count in this case and you can check for the count too
-
sader1992's post in How to Add Custom Quest? was marked as the answer
2018 Client ?
System/OngoingQuestInfoList_Sakray.lub
-
sader1992's post in how to use or put script was marked as the answer
https://github.com/rathena/rathena/wiki/Basic-Scripting#adding-scripts
-
sader1992's post in How to get unique id from OnSellItem ? was marked as the answer
https://github.com/rathena/rathena/pull/4195/files