Jump to content

Eross

Members
  • Posts

    378
  • Joined

  • Last visited

Everything posted by Eross

  1. OnEmpDead: $koegid = getcharid(2); announce "The current King of Emperium Hill is the ["+ strcharinfo(2) +"] guild.", bc_all; donpcevent "::OnRevKoE"; maprespawnguildid "koe", $koegid, 2; killmonster "koe", "KoE::OnEmpDead"; sleep 500; if ( .start ) monster "koe",50,50, "EMPERIUM", 1288, 1, "KoE::OnEmpDead"; sleep 1500; donpcevent "KoEbarricade::OnInit" end; } Try that sir
  2. can you show your KOE script here ... you can try to hideonnpc and hideoffnpc then sett the cell to cell_walkable,0; upon killing the emperium
  3. You have to write the condition statement like this .. dispbottom "You've successfully mined the ore."; if(MineExp < 100000 && (@minechance >= 2 && @minechance <= 6)) dispbottom "You've gained 1 Mining Exp."; if(MineExp < 100000 && (@minechance >= 7 && @minechance <= 11)) dispbottom "You've gained 2 Mining Exp."; if(MineExp < 100000 && (@minechance >= 12)) dispbottom "You've gained 3 Mining Exp."; in your else question always watch our for your curly brackets .. if(@minechance >= 12){ set MineExp,MineExp+3; if(@minechance >= 7) set MineExp,MineExp+2; if(@minechance >= 2) set MineExp,MineExp+1; if(@minechance == 2) getitem 985,1; //elunium else if(@minechance == 3) getitem 984,1; //oridecon else if(@minechance == 4) getitem 7915,1; //bronze coin else if(@minechance == 5) getitem 6223,1; //carnium else if(@minechance == 6) getitem 6224,1; //bradium else if(@minechance == 7) getitem 7916,1; //silver coin else if(@minechance == 8) getitem 6241,1; //hd elunium else if(@minechance == 9) getitem 6240,1; //hd oridecon else if(@minechance == 10) getitem 7619,1; //enriched elunium else if(@minechance == 11) getitem 7620,1; //enriched oridecon else if(@minechance == 12) getitem 6225,1; //hd carnium else if(@minechance == 13) getitem 6226,1; //hd bradium else if(@minechance == 14) getitem 7517,1; //gold coin else if(@minechance == 15) getitem 674,1; //mithril coin else if(@minechance == 16) getitem 677,1; //platinum coin misceffect 154; goto Lsuccess; } after 'if(@minechance >= 12)' and after 'goto Lsuccess' ... you cant add elseif in between of 2 ifs ....
  4. - script SupplyTrigger -1,{ OnSat1930: OnSun1930: enablenpc "Guild Supply#1"; enablenpc "Guild Supply#2"; enablenpc "Guild Supply#3"; // enablenpc "Guild Supply#4"; end; OnAgitEnd: OnAgitEnd2: disablenpc "Guild Supply#1"; disablenpc "Guild Supply#2"; disablenpc "Guild Supply#3"; end; } louyang,226,106,4 script Guild Supply#1 998,{ setarray .@item_id, 12529,20,14003,20; // <Item_ID>,<Item_Amount>,{...}; .@n$ = "["+strnpcinfo(0)+"]"; .@GID = getcharid(2); .@GM = (getguildmaster(.@GID) == strcharinfo(0))?1:0; mes .@n$; mes "Welcome!"; mes (.@GM)?"Have you claimed your supplies today?":"You have no business with me."; next; if (select(((.@GM)?"Claim Supplies":"")+":Leave") == 2) close; query_sql("SELECT COUNT(*) FROM `guild_member` WHERE `guild_id`="+.@GID, .@count); if (.@count < 10) { mes .@n$; mes "You have not enough guild members to claim the supplies."; close; } .@d$ = gettimestr("%Y%m%d",9); .@p = .@GID / 128; .@g = .@GID % 128; if (getd("$GS_"+.@p+"$["+.@g+"]") != .@d$) { mes .@n$; mes "Here you go!"; close2; setd "$GS_"+.@p+"$["+.@g+"]", .@d$; for (.@i = 0; .@i < getarraysize(.@item_id); .@i += 2) getitem .@item_id[.@i],.@item_id[.@i+1]; end; } mes .@n$; mes "You have taken your supplies today."; close; //OnInit: //waitingroom "[Guild Supply]",0; //end; } alberta,31,229,0 duplicate(Guild Supply#1) Guild Supply#2 653 prontera,165,318,1 duplicate(Guild Supply#1) Guild Supply#3 653 //louyang,207,97,0 duplicate(Guild Supply#1) Guild Supply#4 653 i also tried it will appear on a certain time of the day and disappear certain time of the same day errors all is fine but everytime i reload the serve NPC stays its not being hidden i tried putting On Init: still same - script SupplyTrigger -1,{ OnSat1930: OnSun1930: hideoffnpc "Guild Supply#1"; hideoffnpc Supply#2"; hideoffnpc"Guild Supply#3"; // hideoffnpc "Guild Supply#4"; end; OnInit: OnAgitEnd: OnAgitEnd2: hideonnpc "Guild Supply#1"; hideonnpc "Guild Supply#2"; hideonnpc "Guild Supply#3"; end; }
  5. Try hideonnpc and hideoffnpc instead
  6. Sorry for bringing up this ancient post guys ..This still works in latest rA however, character gets frozen and cant move entirely after few seconds
  7. Thankyou !
  8. Hi ! Im using 3 grf on my server , 1 is for main 2 is for palettes and 3 for events ... Question , If im going to encrypt all of those GRF ,does the cps.dll work for all of my grf ?? Im using @Tolkien's GRF EDITOR .. Thankyou !
  9. Thankyou ! one more question .. Is it possible to configure or attach a command in UI buttons like the bank button in alt+V??
  10. for example OnPCloginevent: atcommand "/w"; ... Is it correct ???? can you teach me how to do this ? /am /showname etc
  11. Hi ! I need a script that will debuff gospel, song buffs and other buffs everytime a player enters a portal, use @warp or use flywing or teleport [ALL MAPS] ... Thankyou !!!
  12. Okay thankyou sir ! very helpful ! Cheers omg thankyou so much sir !!!!
  13. What if character has more spaces on name ?? first parameter I think only goes in first name like ex: BLOOD ... but the 2nd goes to BATH so thats 1st and 2nd parameter BLOOD BATH ... what if theres a player whos name is like "O O O O O O" ???
  14. Hi im trying to create a custom command using bindatcmd .. How to make it like @navto <character name> ???? Thankyou in advance !
  15. Thanks but its not working ? still showing Item ID instead of Item name Hi can you help me change the ID into Item name ?? same with cards compounded on the searched item ? and also show the Shop Name .. 1. Item ID to Item name 2. Card ID to Card name 3. Show the Shop name in result Badly need to finish this one ? /*========================================== * @whosells - List who is vending the item (amount, price, and location). * ported to work in latest rA [Cookie] *------------------------------------------*/ ACMD_FUNC(whosells) { 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 = 0; // 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; nullpo_retr(-1, sd); if (!message || !*message) { clif_displaymessage(fd, "Use: @whosells (<+refine> )(<item_id>)(<[card_id]>) or @whosells <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: @whosells (<+refine> )(<item_id>)(<[card_id]>) or @whosells <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, "Refine: +%d | ID: %d | Card: [%d] | Price: %d z | Amount: %d | Seller: %s | Location: %s (%d,%d)" ,pl_sd->cart.u.items_cart[pl_sd->vending[j].index].refine ,pl_sd->cart.u.items_cart[pl_sd->vending[j].index].nameid ,pl_sd->cart.u.items_cart[pl_sd->vending[j].index].card[0] ,pl_sd->vending[j].value ,pl_sd->vending[j].amount ,pl_sd->status.name ,mapindex_id2name(pl_sd->mapindex) ,pl_sd->bl.x,pl_sd->bl.y); else if(item_data->type == IT_WEAPON) snprintf(atcmd_output, CHAT_SIZE_MAX, "Refine: +%d | ID: %d | Cards: [%d,%d,%d,%d] | Price: %d z | Amount: %d | Seller: %s | Location: %s (%d,%d)" ,pl_sd->cart.u.items_cart[pl_sd->vending[j].index].refine ,pl_sd->cart.u.items_cart[pl_sd->vending[j].index].nameid ,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 ,pl_sd->status.name ,mapindex_id2name(pl_sd->mapindex) ,pl_sd->bl.x,pl_sd->bl.y); else snprintf(atcmd_output, CHAT_SIZE_MAX, "ID: %d | Price: %d z | Amount: %d | Seller: %s | Location: %s (%d,%d) | %s" ,pl_sd->cart.u.items_cart[pl_sd->vending[j].index].nameid ,pl_sd->vending[j].value ,pl_sd->vending[j].amount ,pl_sd->status.name ,mapindex_id2name(pl_sd->mapindex) ,pl_sd->message ,pl_sd->bl.x, pl_sd->bl.y); 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) { //if (flag && pl_sd->bl.m == sd->bl.m) { 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 ea. Prices from %dz to %dz.", count, MinPrice, MaxPrice); clif_displaymessage(fd, atcmd_output); } else clif_displaymessage(fd, "Nobody is selling it now."); return 0; }
  16. Hi ! How to get the name of the Item id and the name of merchant's shop ??? I mean the name inside the vending bubble not the character's name .. I want to Show it like "Refine: +0 Item: Jur [Card name 1, Card name 2, Card name 3, Card name 4]" instead of showing it as "+0 <Jur ID>[Card id,card id ,card id,card id] .. And also how to show the name of vendor's shop like SHOP NAME: JURS HERE ....Thanks
  17. Its working !! THAKYOU SIR !!!!! ^_^
  18. Thanks for the answer ...Can you help me edit this script to make permanent per character ??? thankyou I actually copied some lines from this script and its kinda weird that this npc can save datas while mine cant [FIXED] ~ (I guess?) I changed all the @revert into revert mes "Choose which slot you'd like to save to:"; close2; set .@x, select(""+.@SlotName$+" [" +revert[1]+ "]", ""+.@SlotName$+" [" +revert[2]+ "]", ""+.@SlotName$+" [" +revert[3]+ "]", ""+.@SlotName$+" [" +revert[4]+ "]", ""+.@SlotName$+" [" +revert[5]+ "]"); setarray revert[.@x], .@Revert; break; ~~~
  19. Hi! Im trying to add SAVE LOAD and SELL Style feature on my stylist ... Question, why does all my saved styles get wiped out everytime I logout/login ??? Thanks prontera,76,96,1 script Stylist#custom_stylist 122,{ set .@Styles, getbattleflag("max_hair_style"); set .@Look, LOOK_HAIR; set .@Revert, getlook(.@Look); set .@Style,1; set .cost,70000; set .@SlotName$,"Hair Style"; @stylist_look_type = .@Look; @stylist_look_value = getlook(@stylist_look_type); addtimer 1, strnpcinfo(0) + "::OnPCLogoutEvent"; switch(select("Change Hairstyle:Style collections:Quit")) { case 1: while(1) { ignoretimeout 1; setlook .@Look, .@Style; mes "Hair Style [#"+.@Style+"]."; set .@menu$, " ~ Next (^0055FF"+((.@Style!=.@Styles[.@s])?.@Style+1:1)+"^000000): ~ Previous (^0055FF"+((.@Style!=1)?.@Style-1:.@Styles[.@s])+"^000000): ~ Jump to...: ~ I want this style"; switch(prompt(.@menu$)) { case 1: set .@Style, ((.@Style != .@Styles[.@s]) ? .@Style+1 : 1); break; case 2: set .@Style, ((.@Style != 1) ? .@Style-1 : .@Styles[.@s]); break; case 3: message strcharinfo(0),"Choose a style between 1 - "+.@Styles[.@s]+"."; input .@Style,0,.@Styles[.@s]; if (!.@Style) set .@Style, rand(1,.@Styles[.@s]); break; case 4: // You have to set the values to 0 and remove the timer event once the colors are chosen and confirmed // Your code currently doesn't have a way out of your loops, so I added this one. @stylist_look_type = @stylist_look_value = 0; deltimer strnpcinfo(0) + "::OnPCLogoutEvent"; end; default: set .@Style, .@Revert; setlook .@Look[.@s], .@Revert; end; } } case 2: while(1) { switch(select("Save current hairstyle:Load hairstyle:Sell hairstyle")) { case 1: mes "Choose which slot you'd like to save to:"; close2; set .@x, select(""+.@SlotName$+" [" +@revert[1]+ "]", ""+.@SlotName$+" [" +@revert[2]+ "]", ""+.@SlotName$+" [" +@revert[3]+ "]", ""+.@SlotName$+" [" +@revert[4]+ "]", ""+.@SlotName$+" [" +@revert[5]+ "]"); setarray @revert[.@x], .@Revert; break; case 2: mes "Choose which slot you'd like to load from:"; close2; set .@x, select(""+.@SlotName$+" [" +@revert[1]+ "]", ""+.@SlotName$+" [" +@revert[2]+ "]", ""+.@SlotName$+" [" +@revert[3]+ "]", ""+.@SlotName$+" [" +@revert[4]+ "]", ""+.@SlotName$+" [" +@revert[5]+ "]"); if (@revert[.@x] == 0) { message strcharinfo(0),"NO SAVED STYLE"; end; } setlook LOOK_HAIR, @revert[.@x]; @stylist_look_type = @stylist_look_value = 0; //deltimer strnpcinfo(0) + "::OnPCLogoutEvent"; break; case 3: mes "Choose which slot you'd like to sell:"; close2; set .@x, select(""+.@SlotName$+" [" +@revert[1]+ "]", ""+.@SlotName$+" [" +@revert[2]+ "]", ""+.@SlotName$+" [" +@revert[3]+ "]", ""+.@SlotName$+" [" +@revert[4]+ "]", ""+.@SlotName$+" [" +@revert[5]+ "]"); if (@revert[.@x] == 0) { message strcharinfo(0),"NO SAVED STYLE"; end; } switch (select("Cofirm:Cancel")) { setarray @revert[.@x], ""; } } } } end; OnPCLogoutEvent: if (@stylist_look_type != 0) { setlook @stylist_look_type, @stylist_look_value; } deltimer strnpcinfo(0) + "::OnPCLogoutEvent"; end; }
  20. Im trying to modify this hairstyler npc to do the following things . 1. Upon selecting the confirmation for new hairstyle, the npc will ask (Do you want to save this style on your wardrobe?), if you select NO your hairstyle will just change, if YES there will be 3 slots to choose to save your style and your appearance will change as well... 2. If the slots are full, the npc will ask to overwrite the slot .. 3. You can view or choose from your wardrobe which style to switch on .. and you can also delete saved style one by one .. I need help ... Thankyou !
  21. Sir @Emistry .. Can you add a wardrobe option ?? *If a player purchased the style, for example I paid for hairstyle #1 .. The said style will be added to wardrobe list , and everytime I want to use may purchased styles the npc will never ask for payment ... But the wardrobe can only store up to 5 styles per category .. 5 Hairstyle , 5 hair dye and 5 clothes dye , The player needs to decide replacing or deleting the least style
  22. How?? Like this ? ~~> channel_kick "#main",getcharid(0); or as atcommand "channel_kick #main" ??? Thanks ! channel_kick "#main",getcharid(0); ~> this one, nothing happens hehe I tried to make a script that will automatically turn off channel on login ... but somethings strange happens every time I login that char other player gets a ?? on their chat
  23. Thankyou sir @Tokei ! Youve saved me again ! ^_^ ... Another on sir,, How about when a player succesfully paid for a style ,for example Hairstyle #1 .. That style will be marked at (PURCHASED STYLE) and whenever he/she wants to use that style , the NPC will not ask for payment anymore .. sir @Chaos92 yes exactly sir ...
  24. Hi ,how to make this script revert all styles when player tries to bug it using ALT+F4 ????
  25. Hello rAthena comm.. I recently noticed that 'atcommand "@channel leave #<channel>";' is not working on scripts ... Can I request for a script command that will leave player on a channel ?? like @chanleave etc ..thanks
×
×
  • Create New...