Jump to content

Gidz Cross

Members
  • Posts

    659
  • Joined

  • Last visited

  • Days Won

    9

Posts posted by Gidz Cross

  1. 3 hours ago, sader1992 said:

    to save time and replies

    here is a step-by-step

    rathena/src/map/script.cpp

    search for

    
    BUILDIN_FUNC(cutin)
    {
    	TBL_PC* sd;
    
    	if( !script_rid2sd(sd) )
    		return SCRIPT_CMD_SUCCESS;
    
    	clif_cutin(sd,script_getstr(st,2),script_getnum(st,3));
    	return SCRIPT_CMD_SUCCESS;
    }

    replace

    
    if( !script_rid2sd(sd) )

    with

    
    if (!script_charid2sd(4, sd))

     

    search and replace this

    
    BUILDIN_DEF(cutin,"si"),

    with

    
    BUILDIN_DEF(cutin,"si?"),

    DON'T FORGET TO RECOMPILE YOUR SERVER!

     

    and this is an example on how i would have done it

    
    prontera,0,0,0	script	gdfjfhadh	444,{
    	function cutin2;
    	announce("test 1",BC_ALL);
    	cutin2("prontera","pc.bmp",2);
    	sleep 3000;
    	announce("test 2",BC_ALL);
    	cutin2("prontera","",255);
    	sleep 3000;
    	announce("test 3",BC_ALL);
    	cutin2("prontera","pc.bmp",2);
    	sleep 3000;
    	announce("test 4",BC_ALL);
    	cutin2("prontera","",255);
    end;
    
    	function	cutin2	{
    		freeloop(true);
    		.@map$ = getarg(0);
    		.@filename$ = getarg(1);
    		.@position = getarg(2);
    		.@s = getmapunits(BL_NPC,.@map$,.@SD);
    		for(.@i=0;.@i<.@s;.@i++){
    			cutin(.@filename$,.@position,convertpcinfo(.@SD[.@i],CPC_CHAR));
    		}
    		return;
    	}
    }

     


    Oh my! This is HUGE! Thanks @sader1992. However i did try this and this is my result
    image.thumb.png.f0410b6fc72beb06233cc02a76fb345a.png


    also, is there an option for the whole players of the server? Not just specific map. Thanks!

  2. This can be found in 

    Well as you can see its very old. In the second page of the thread it was updated to year 2017 (or not) by @solid2005 and applied all the bug fixes

    On 9/18/2017 at 5:55 PM, solid2005 said:

    i didn't test this code. i try my best to help you.

    WARNING Backup first and use a test server if stable,

    Note : Update for newer GIT NO (bug fix and add on).

    Extended_Cell_PvP_1.7.1.patch

    Can someone update this to current rathena or year 2020 rathena? Thanks!

  3. 6 hours ago, sader1992 said:

    checkout the command detachrid

    Yes ive tested it. And it doesnt work. Is there another way to detachrid using addrid(0);?

    Ive seen this thread. This what happens to me. @addrid, @detachrid? - Scripting Support - rAthena

    My test were

    addrid(0); cutin "xxx",2; detachrid; (this supposed to close the cutin before the annouce script)
    announce "hello world!",0,0x00FFFD;

    i also tried

    addrid(0); cutin "xxx",2; end;
    announce "Hello world!",0,0x00FFFD;

    But its ending the whole script. Make sense i did use END after the the cutin.

  4. On 7/18/2021 at 1:32 AM, sader1992 said:

    cutin needs a player to be attached in the script first,

    OnTimer event does not attach any plyer

    checkout addrid command

    Oh yes. I have tried adding addrid(0); before cutin "xxx",2; 

    I thought it works. Until i tried to login my second account. The announcement got doubled. Is the more efficient way to do this? Kindly refer to the youtube link i posted.

     

    I think i have solved it. By making another script solely for the cutins to work alone. Tied with my onlocks and onminutes. Unless otherwise there is still efficient way.

    Example
     

    -	script	Nvz#cutin	-1,{
    
    OnClock0035:
    OnClock0115:
    OnClock0235:
    OnClock0335:
    OnClock0435:
    OnClock0535:
    OnClock0635:
    OnClock0735:
    OnClock0835:
    OnClock0935:
    OnClock1035:
    OnClock1135:
    OnClock1235:
    OnClock1335:
    OnClock1435:
    OnClock1535:
    OnClock1635:
    OnClock1735:
    OnClock1835:
    OnClock1935:
    OnClock2035:
    OnClock2135:
    OnClock2235:
    OnClock2335:
    	addrid(0); cutin "nvz.bmp",2;
    	sleep 5000;
    	addrid(0); cutin "nvz.bmp",2;
    	sleep 5000;
    	addrid(0); cutin "nvz.bmp",2;
    	sleep 5000;
    	addrid(0); cutin "nvz.bmp",2;
    	sleep 60000;
    	addrid(0); cutin "nvz.bmp",2;
    	sleep 30000;
    	addrid(0); cutin "nvz.bmp",2;
    	sleep 10000;
    	addrid(0); cutin "nvz.bmp",2;
    	sleep 5000;
    	addrid(0); cutin "",255;
    	end;
    }

     

  5. Hello. Im not sure if im in the correct section. To all mods, please move the topic if its not. Anyways...

    Im trying to put cutin supports to my automated events that uses announce. How can i properly call cutin and properly close it as well? The idea is this.

    OnClock0100:	
    	if (agitcheck() || agitcheck2() || agitcheck3()) end;
    	cutin "pc.bmp",2; (This works)
    	announce "It's time to play some Poring Catcher!",0,0x00FFFD;
    
    OnTimer30000:
    	cutin "pc.bmp",2; // To re show the cutin (Will show error/debug to map saying Player not attached)
    	announce "Last 30 seconds.",0,0x00FFFD;
    	sleep 5000;
    	announce "Hurry to Midgard 40 315 or you can type @event if you want to join.",0,0x00FFFD;
    	end;
    
    OnTimer60000:
    	cutin "",255; // To close the cutin ( Will show error/debug to map saying Player not attached)
    	announce "The Poring Catcher has begun!",0,0x00FFFD;
    	end;

    Thanks guys!

    The idea is this:
    Catch the Poring Event (Darkside RO) - YouTube
     

  6. Well this isnt compatible with my TRUNK. But @Scylla was able to help me with it. Thank you so much bro!

    if somebody have this on your battle.c

    	if (flag & BF_SHORT) {//Bounces back part of the damage.
    		if ( (skill_get_inf2(skill_id, INF2_ISTRAP) || !status_reflect) && sd && sd->bonus.short_weapon_damage_return ) {
    			rdamage += damage * sd->bonus.short_weapon_damage_return / 100;
    			rdamage = i64max(rdamage,1);
    		} else if( status_reflect && sc && sc->count ) {

    change it to
     

    	if (flag & BF_SHORT) {//Bounces back part of the damage.
    		if ( (skill_get_inf2(skill_id, INF2_ISTRAP) || !status_reflect) && sd && sd->bonus.short_weapon_damage_return) {
    			rdamage = i64max(rdamage,-1);
    		}
    		else if ( (status_reflect) && sd && sd->bonus.short_weapon_damage_return) {
    			rdamage += damage * sd->bonus.short_weapon_damage_return / 100;
    			rdamage = i64max(rdamage,1);
    		}
    		if( status_reflect && sc && sc->count ) {


    voila!!!

    • Upvote 1
    • Like 1
  7. Not your typical item exchanger. The idea is it will allow me to exchange setarrays of items. (eg. auras)

    Lets say i have black amaterasu auras

    Quote

    35505,Amaterasu_Aura_Black,Amaterasu Aura Black,4,20,,0,,0,,0,0xFFFFFFFF,7,2,4096,,0,0,5054,{ bonus bAllStats,1; },{},{}
    35506,Amaterasu_Aura_Blue,Amaterasu Aura Blue,4,20,,0,,0,,0,0xFFFFFFFF,7,2,4096,,0,0,5069,{ bonus bAllStats,1; },{},{}
    35507,Amaterasu_Aura_Gold,Amaterasu Aura Gold,4,20,,0,,0,,0,0xFFFFFFFF,7,2,4096,,0,0,5070,{ bonus bAllStats,1; },{},{}
    35508,Amaterasu_Aura_Green,Amaterasu Aura Green,4,20,,0,,0,,0,0xFFFFFFFF,7,2,4096,,0,0,5071,{ bonus bAllStats,1; },{},{}
    35509,Amaterasu_Aura_Navy_Blue,Amaterasu Aura Navy Blue,4,20,,0,,0,,0,0xFFFFFFFF,7,2,4096,,0,0,5072,{ bonus bAllStats,1; },{},{}
    35510,Amaterasu_Aura_Pink,Amaterasu Aura Pink,4,20,,0,,0,,0,0xFFFFFFFF,7,2,4096,,0,0,5073,{ bonus bAllStats,1; },{},{}
    35511,Amaterasu_Aura_Red,Amaterasu Aura Red,4,20,,0,,0,,0,0xFFFFFFFF,7,2,4096,,0,0,5074,{ bonus bAllStats,1; },{},{}
    35512,Amaterasu_Aura_White,Amaterasu Aura White,4,20,,0,,0,,0,0xFFFFFFFF,7,2,4096,,0,0,5075,{ bonus bAllStats,1; },{},{}

    i want to exchange my Black Aura to different colors.  The NPC should auto detect that u have that specific aura. And will bring up a menu with different choices. Ofcourse the NPC whould charge me like Aura Coupon or something.

    I have tons of aura on my project this will be useful for players if they lose interest with the current color of their aura and decided to switch to other colors.

  8.  

    On 4/17/2020 at 1:28 PM, Racaae said:
      Hide contents
    
    
    -	script	rewardcommand	HIDDEN_WARP_NPC,{
    OnInit:
    //==== CONF =====
    	.sender$ = "GM Team";
    	.title$ = "Reward";
    	.body$ = "Here's something for you. Have fun!";
    	.zeny = 0;	// Default zent sent
    	setarray .mailitem[0], 607, 617; // Default items (Max.5)
    	setarray .mailamount[0], 3, 1; // Default items quantity
    //===============	
    	bindatcmd "reward", strnpcinfo(3)+"::OnAtcommand", 99;
    	end;
    
    OnAtcommand:
    	if (.@atcmd_parameters$[0] == "all")
    		.@mode = 1;
    	if (.@atcmd_parameters$[0] == "map")
    		.@mode = 2;
    	if (.@mode) {
    		if (getarraysize(.mailitem) != getarraysize(.mailamount)) {
    			dispbottom "Error.";
    			end;
    		}
    		if (.@mode == 1)
    			addrid(0, 0);
    		else
    			addrid(1, 0);
    		if (checkvending(strcharinfo(0)))
    			detachrid;
    		if (.mailitem[0])
    			mail getcharid(0), .sender$, .title$, .body$, .zeny, .mailitem, .mailamount;
    		else
    			mail getcharid(0), .sender$, .title$, .body$, .zeny;
    		detachrid;
    		end;
    	}
    	mes "Use [@reward all] to send rodex to everyone online.";
    	mes "Use [@reward map] to send rodex to everyone on your map.";
    	while (true) {
    		next;
    		mes "RodEx contents:";
    		mes "" + callfunc("F_InsertComma",.zeny) + "z.";
    		if (.mailitem[0]) {
    			for ( .@i = 0; .@i < getarraysize(.mailitem); ++.@i )
    				mes "" + .mailamount[.@i] + "x " + getitemname(.mailitem[.@i]) + ".";
    		}
    		switch(select("Close.", "Change zeny.", "Change item(s).")) {
    		case 1:
    			close;
    		case 2:
    			input .zeny;
    			break;
    		case 3:
    			do {
    				next;
    				mes "[Item list]";
    				if (.mailitem[0]) {
    					for ( .@i = 0; .@i < getarraysize(.mailitem); ++.@i )
    						mes "" + .mailamount[.@i] + "x " + getitemname(.mailitem[.@i]) + ".";
    				}
    				else
    					mes "Empty.";
    				next;
    				switch(select("Return", "Add item", "Remove item", "Remove all")) {
    				case 1:
    					break;
    				case 2:
    					if (getarraysize(.mailitem) > 4) {
    						mes "You cannot add more items. Max 5.";
    						break;
    					}
    					mes "Input item ID.";
    					input .@newitem;
    					if (getitemname(.@newitem) == "null") {
    						mes "Item not found.";
    						break;
    					}
    					mes "- " + getitemname(.@newitem);
    					if (getiteminfo(.@newitem, 2) == 4 || getiteminfo(.@newitem, 2) == 5 || getiteminfo(.@newitem, 2) == 12) {
    						.@newqut = 1;
    					}
    					else {
    						mes "Input item quantity.";
    						input .@newqut;
    						if (.@newqut < 1 || .@newqut > 1000) {
    							mes "Invalid quantity.";
    							break;
    						}
    					}
    					.mailitem[getarraysize(.mailitem)] = .@newitem;
    					.mailamount[getarraysize(.mailamount)] = .@newqut;
    					next;
    					break;
    				case 3:
    					if (.mailitem[0]) {
    						mes "Input index to remove.";
    						for ( .@i = 0; .@i < getarraysize(.mailitem); ++.@i )
    							mes "" + .@i + ": " + .mailamount[.@i] + "x " + getitemname(.mailitem[.@i]) + ".";
    						input .@i;
    						if (.mailitem[.@i] == 0 || .mailamount[.@i] == 0)
    							mes "Invalid index.";
    						else {
    							deletearray .mailitem[.@i], 1;
    							deletearray .mailamount[.@i], 1;
    						}
    					}
    					else
    						mes "No item to remove.";
    					break;
    				case 4:
    					deletearray .mailitem[0], getarraysize(.mailitem);
    					deletearray .mailamount[0], getarraysize(.mailamount);
    					break;
    				}
    			} while (@menu != 1);
    		}
    	}
    }

     

    Hi. I didn't test much. The command is @reward.

    Wow its good. But it wont send mails to offline players. Can we have that option? Thanks!

  9. On 1/22/2021 at 10:06 PM, Cookie-rae said:

     

    I already revamp change the script of this base on your explanation if you need just notify me.
     

    Wow! Can i check? Ive been away to ragnarok scene for 2 months now. ♥ But i want to check good sir!

  10. i dont see guide regarding custom garment in judas bible.

    image.png.eb631ed8327d9095b5b03d3d1d310146.png 

     

    Well i have solved my inquiry already. Like i said this bible is for older client. @IsabelaFernandez, you can refer here instead https://github.com/rathena/rathena/wiki/Custom_weapons. Skip the older client thingy. Your iteminfo will play big part of it. You have to declare it in your ClassNum = XXX. 

    Remember i said its like adding costume garment? Well you need to modify the weapontable.lub.

  11. 13 hours ago, polong said:

    hello, can you tell me how you solved it?
    i also have same problem like you
    i already copy from RE skill_db, but still can not cast hell plant

    You cannot cast the hellplant? YOu got a different problem. Me on the otherhand fixes my problem by 

    On 5/16/2020 at 4:36 AM, Gidz Cross said:

    Thank you for your reply. But i have managed to fixed it my self. The solution is to copy whats on RE skill_db.yml into PRE RE skill_db.yml. That solves my problem.

     

×
×
  • Create New...