Jump to content

clydelion

Members
  • Posts

    754
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by clydelion

  1. yes, only script.c file. dont forget to define it in script reference list BUILDIN_DEF(sendmail,"isssiii"),
  2. As of now, it detects the recipient's name automatically from the given charid.. and you can get anyone's charid using getcharid(0,"Rad").. And this doesnt need to use attachrid, as long as you have a charid you can use it (unless I didnt get what you're saying). And the additional parameters, yes.. It would be nice to. I'll do it later. @Emistry Yes, I was wondering why I can't upload .diff or .patch files.. I guess ipb settings were changed.. I reported it already :] Thanks everyone for feedback.
  3. Mail via Scriptcommand With this mod, you can do something like this.. (The sample code in the background is outdated) This is a scriptcommand I wanted when I still had a server. It can be used in Achievement Systems, WoE prizes, and other events. This is better than getitem because the recipient doesn't need to be online. Usage: * sendmail <Recipient's Char ID>,"<Sender's Name>","<Title>","<Body>",<zeny>,<item_id>,<amount>{,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>}; Description: Uses the same functions as the default mail system, but this time, it is done via script. All item, recipent, message, and title assignment are done in the background. Enjoy this free release. PS: This have not been used on a live server, if you discover a bug (or if there's something wrong with my coding) let me know. My sample script: This code will give the player a +10 Knife and 10,000 zennies upon reaching job level 10. -<tab>script<tab>Mail Test<tab>-1,{ OnPCJobLvUpEvent: if(JobLevel != 9) end; set .charid, getcharid(0); set .sender$, "Achievement System"; set .title$, "Basic Skills"; set .itemid, 1201; set .itemamount, 1; set .zeny, 10000; set .refine, 10; set .body$, "You have successfully unlocked the achievement '"+.title$+"'. You have received "+.itemamount+" "+getitemname(.itemid)+"s and "+.zeny+" zennies."; sendmail .charid,.sender$,.title$,.body$,.zeny,.itemid,.itemamount,.refine; end; } PS: This wasn't used on a live server, please report any bugs you encounter. DIFF LINK
  4. Here.. atcommand.c add after the last command /*========================================== * @itemall command (usage: @itemall <name/id_of_item> <quantity>) * Ported to a global command by clydelion *------------------------------------------*/ ACMD_FUNC(itemall) { struct map_session_data *pl_sd = NULL; struct s_mapiterator* iter; char item_name[100]; int number = 0, item_id; struct item item_tmp; struct item_data *item_data; int get_count, i, j = 0; nullpo_retr(-1, sd); memset(item_name, '\0', sizeof(item_name)); if (!message || !*message || ( sscanf(message, "\"%99[^\"]\" %d", item_name, &number) < 1 && sscanf(message, "%99s %d", item_name, &number) < 1 )) { clif_displaymessage(fd, msg_txt(983)); // Please enter an item name or ID (usage: @item <item name/ID> <quantity>). return -1; } if (number <= 0) number = 1; if ((item_data = itemdb_searchname(item_name)) == NULL && (item_data = itemdb_exists(atoi(item_name))) == NULL) { clif_displaymessage(fd, msg_txt(19)); // Invalid item ID or name. return -1; } item_id = item_data->nameid; get_count = number; //Check if it's stackable. if (!itemdb_isstackable2(item_data)) get_count = 1; iter = mapit_getallusers(); for( pl_sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); pl_sd = (TBL_PC*)mapit_next(iter) ){ int flag = 0; if( pc_get_group_level(pl_sd) > pc_get_group_level(sd) ) continue; if( pl_sd == sd ) continue; for ( i = 0; i < number; i += get_count ) { // if not pet egg if (!pet_create_egg(pl_sd, item_id)) { memset(&item_tmp, 0, sizeof(item_tmp)); item_tmp.nameid = item_id; item_tmp.identify = 1; if ((flag = pc_additem(pl_sd, &item_tmp, get_count, LOG_TYPE_COMMAND))) clif_additem(pl_sd, 0, 0, flag); } } if (flag == 0){ sprintf(atcmd_output,"You have received %d %s %s from %s.",i,i>1?"pcs.":"pc.",item_data->name, sd->status.name); clif_displaymessage(pl_sd->fd,atcmd_output); j++; } } sprintf(atcmd_output,"You have given %d %s %s to %d %s.",i,i>1?"pcs.":"pc.",item_data->name,j,j>1?"players":"player"); clif_displaymessage(fd,atcmd_output); return 0; } declare it in the command reference list.. AtCommandInfo atcommand_base[] = { + ACMD_DEF(itemall), ACMD_DEF2("warp", mapmove), I've attached a diff. itemall_atcommand.diff
  5. clydelion

    Pre-RE EDP

    Here's a snippet from the src to determine what is not affected by EDP if( sc->data[sC_EDP] ){ switch(skill_num){ case AS_SPLASHER: case AS_VENOMKNIFE: case AS_GRIMTOOTH: break; #ifndef RENEWAL_EDP case ASC_BREAKER: case ASC_METEORASSAULT: break; #else case AS_SONICBLOW: case ASC_BREAKER: case GC_COUNTERSLASH: case GC_CROSSIMPACT: ATK_RATE(50); // only modifier is halved but still benefit with the damage bonus #endif default: ATK_ADDRATE(sc->data[sC_EDP]->val3); } } I'll explain this bit by bit.. This part disables EDP effect on those skills regardless of the settings.. case AS_SPLASHER: case AS_VENOMKNIFE: case AS_GRIMTOOTH: break; This part disables EDP effect on those skills if server is using PRE-RE EDP case ASC_BREAKER: case ASC_METEORASSAULT: break; This part disables EDP effect on those skills if server is using RENEWAL EDP but on 50% skill modifier case AS_SONICBLOW: case ASC_BREAKER: case GC_COUNTERSLASH: case GC_CROSSIMPACT: ATK_RATE(50); // only modifier is halved but still benefit with the damage bonus This is the src of the current SVN.
  6. clydelion

    Pre-RE EDP

    sonicblow only increase damage in Renewal edp.
  7. Ahh yes. I overlooked this when I ported the scriptcommand. I was in a hurry back then and didnt bother removing those useless parts. But you got what I meant.
  8. Use the same settings from your rathena config.. from conf/inter_athena.conf, use that ip, username and password..
  9. Hello, we have @homevolve, and I don't see why we wouldn't want to have this.. This is basically a port from Xantara's scriptcommand. Index: atcommand.c =================================================================== --- atcommand.c (revision 16920) +++ atcommand.c (working copy) @@ -8786,6 +8786,41 @@ #undef MC_CART_MDFY } +/*========================================== + * ported from Xantara's homunculus_mutate + * scriptcommand [clydelion] + *------------------------------------------*/ +ACMD_FUNC(hommutate) +{ + int homun_id, m_class = 0, m_id; + int homun_array[5] = {6048,6049,6050,6051,6052}; + nullpo_retr(-1, sd); + + if ( !merc_is_hom_active(sd->hd) ) { + clif_displaymessage(fd, msg_txt(1254)); // You do not have a homunculus. + return -1; + } + + if( sd == NULL ) + return -1; + if (!message || !*message) + homun_id = homun_array[rnd() % 5]; + else + homun_id = atoi(message); + + m_class = hom_class2mapid(sd->hd->homunculus.class_); + m_id = hom_class2mapid(homun_id); + + if ( m_class != -1 && m_id != -1 && m_class&HOM_EVO && m_id&HOM_S && sd->hd->homunculus.level >= 99 ) + hom_mutate(sd->hd, homun_id); + else + { + clif_displaymessage(fd, "Your homunculus must be level 99 to mutate."); + clif_emotion(&sd->hd->bl, E_SWT); + } + return 0; +} + /** * Fills the reference of available commands in atcommand DBMap **/ @@ -8796,6 +8831,7 @@ * Command reference list, place the base of your commands here **/ AtCommandInfo atcommand_base[] = { + ACMD_DEF(hommutate), ACMD_DEF2("warp", mapmove), ACMD_DEF(where), ACMD_DEF(jumpto), Usage: @hommutate <homid> PS: I was thinking to merge this to the current @homevolve instead of making a new command, but it's called mutate now so... Cheers! homunculus_mutate_atcommand.diff
  10. That's what I'm considering a 'custom content'. While @reloadrefinerate can be considered redundant because @reloadstatusdb does the same.
  11. @reloadstatusdb reloads refine_db.txt this suggestion is more likely a custom content for me.
  12. duplicate the green part for every server
  13. status.c #ifndef RENEWAL_EDP val3 = 50*(val1+1); //Damage increase (+50 +50*lv%) #endif change it to #ifndef RENEWAL_EDP val3 = 40*(val1); //Damage increase (+40*lv%) #endif 40 * skilllevel(5) = 200.
  14. Version 1.0

    402 downloads

    What it does? This addon for FluxCP enables the control panel to display harmony's log. Requirements: 1. FluxCP 2. Harmony Patterned from default fluxcp pages. Nothing fancy.
    Free
  15. File Name: Harmony Logs Viewer for FluxCP File Submitter: clydelion File Submitted: 21 Nov 2012 File Category: Web Resources Content Author: clydelion What it does? This addon for FluxCP enables the control panel to display harmony's log. Requirements: 1. FluxCP 2. Harmony Patterned from default fluxcp pages. Nothing fancy. Click here to download this file
  16. Index: map/guild.c =================================================================== --- map/guild.c (revision 16820) +++ map/guild.c (working copy) @@ -1607,6 +1607,12 @@ if(flag!=0 || g==NULL) return 0; + + if(agit_flag || agit2_flag){ + sd = map_nick2sd(g->master); + clif_disp_onlyself(sd,"You are not allowed to /breakguild while WoE is active.",55); + return 0; + } for(i=0;i<g->max_member;i++){ // ƒMƒ‹ƒh‰ðŽU‚ð’Ê’m if((sd=g->member[i].sd)!=NULL){
  17. It is there since rev 5446 http://trac.rathena.org/search?q=nocommand
  18. Here's mine. Coded it 4 years ago. This was from my event pack w/c was released in ea before, I edited it to work without the other stuff. - script left4dead -1,{ OnInit: bindatcmd("nvz","left4dead::OnEvent"); end; OnEvent: announce "Event Zombie Vs. Novice will begin in ~5~",0; sleep 1000; announce "Event Zombie Vs. Novice will begin in ~4~",0; sleep 1000; announce "Event Zombie Vs. Novice will begin in ~3~",0; sleep 1000; announce "Event Zombie Vs. Novice will begin in ~2~",0; sleep 1000; announce "Event Zombie Vs. Novice will begin in ~1~",0; sleep 1000; //if ( getmapusers("quiz_01") <= 1){ //announce "Not enough players.. Event cancelled.",0; //sleep 1000; //} announce "Event 'Zombie Vs. Novice' has begun!!",0,0x00FF00; announce "Novice RFYL Event: "+getmapusers("quiz_01")+" players in the Event.",0,0x00FF00; sleep 5000; mapannounce "quiz_01","WARNING: Four Zombies will spawn near the center in 10 seconds and everytime a players dies!",0; sleep 5000; monster "quiz_01",42,369,"LEFT4DEAD",1015,4; end; winner: killmonsterall "quiz_01"; mapannounce "quiz_01","You have won",0; enablenpc "Prize"; stopnpctimer; close; end; OnPCDieEvent: getmapxy .@maprfyl$,.@xrfyl,.@yrfyl,0; if ( .@maprfyl$ == "quiz_01") { monster "quiz_01",.@xrfyl,.@yrfyl,""+strcharinfo(0)+"",1015,1; announce "Novice RFYL Event: "+getmapusers("quiz_01")+" remaining players in the Event.",0,0x00FF00; sleep2 1; warp "prontera",156,223; atcommand "@alive "+ strcharinfo(0); dispbottom "You have died..."; if ( getmapusers("quiz_01") <= 1) goto winner; } end; } quiz_01,42,369,3 script Prize 72,{ announce "Novice RFYL Event: " + strcharinfo (0) + " won! " + (sex == 1?"He": "She") +" won an item!",0; getitem 501,1; warp "prontera",156,223; disablenpc "Prize"; end; OnInit: disablenpc "Prize"; end; } http://pastebin.com/ub8Wse1D How to use: 1. Players must be in this place (quiz_01 42 369) 2. A gm must activate it via @nvz NOTE: Currently, they will turn into zombies when they die (a zombie will spawn with the player's[the one who died] name on it.) With a SRC modification, you can make them turn just by a mere touch of the zombies. NOTE: If you're gonna use this, you may want to add a warper that allows only novice 1/1. I got this idea from another NVZ script but I'm too lazy to find it.
  19. As always, great work GreenBox! Web freaks, mob him now! ~All the best.
  20. He was talking about the fixed cast time w/c is present if RENEWAL_CAST is defined.
  21. Would this be enough? Index: map/skill.c =================================================================== --- map/skill.c (revision 16920) +++ map/skill.c (working copy) @@ -13666,7 +13666,7 @@ { struct status_change *sc = status_get_sc(bl); struct map_session_data *sd = BL_CAST(BL_PC,bl); - int fixed = skill_get_fixed_cast(skill_id, skill_lv), fixcast_r = 0, varcast_r = 0, i = 0; + int fixed = (sd && sd->class_&JOBL_THIRD) ? skill_get_fixed_cast(skill_id, skill_lv):0 , fixcast_r = 0, varcast_r = 0, i = 0; if( time < 0 ) return 0;
  22. Yes it is covered. I also propose changing it to can_give instead of can_trade. Yes, please.
  23. If you don't want to do src modification.. - script rewardpoints -1,{ OnInit: bindatcmd("rewardpoints","rewardpoints::OnCommand"); end; OnCommand: dispbottom "You currently have " +rewardpoints+ " reward points"; end; }
  24. for the step 2 in atcommand.c, search for this part /** * Command reference list, place the base of your commands here **/ AtCommandInfo atcommand_base[] = { ACMD_DEF2("warp", mapmove), ACMD_DEF(where), ACMD_DEF(autostore), ACMD_DEF(jumpto), add your command there ex. /** * Command reference list, place the base of your commands here **/ AtCommandInfo atcommand_base[] = { + ACMD_DEF(newcommand), ACMD_DEF2("warp", mapmove), ACMD_DEF(where), ACMD_DEF(autostore), ACMD_DEF(jumpto),
  25. If your server is running on "RE" mode, it should load them.. If it is in "PRE-RE" and want to load them, manually add them to the scripts.. It is located in \npc\re\mobs\fields\bifrost.txt
×
×
  • Create New...