R> Command from rA

Söel

New member
Messages
74
Points
0
Age
36
Emulator
rAthena
Client Version
2020-04-01bRagexe
Hello,

I would ask someone
who understands src to make two commands rA be compatible here in Hercules, they are: @identifyall,@clonestats and @cloneequip.

 
sry for being sarcastic

Code:
-	script	kdjshfksdjfh	-1,{
OnInit:
	bindatcmd "identifyall", strnpcinfo(0)+"::Onaaa", 99, 100;
	bindatcmd "clonestats", strnpcinfo(0)+"::Onbbb", 99, 100;
	bindatcmd "cloneequip", strnpcinfo(0)+"::Onccc", 99, 100;
	end;
Onaaa:
	getinventorylist;
	for ( .@i = 0; .@i < @inventorylist_count; .@i++ ) {
		if ( !@inventorylist_identify[.@i] ) {
			delitem2 @inventorylist_id[.@i], 1,0,0,0,0,0,0,0;
			getitem @inventorylist_id[.@i], 1;
			.@c++;
		}
	}
	dispbottom .@c +" items identified";
	end;
Onbbb:
	if ( !.@atcmd_numparameters ) {
		dispbottom "you need to enter a player name";
		end;
	}
	.@aid = getcharid( 3, .@atcmd_parameters$ );
	if ( !.@aid ) {
		dispbottom "player not found or not online";
		end;
	}
	.@origin = getcharid(3);
	attachrid .@aid;
	.@stats = StatusPoint;
	.@level = BaseLevel;
	.@job = Class;
	.@str = readparam(bStr);
	.@agi = readparam(bAgi);
	.@vit = readparam(bVit);
	.@int = readparam(bInt);
	.@dex = readparam(bDex);
	.@luk = readparam(bLuk);
	attachrid .@origin;
	jobchange .@job;
	BaseLevel = .@level;
	resetstatus;
	statusup2 bStr, .@str -1;
	statusup2 bAgi, .@agi -1;
	statusup2 bVit, .@vit -1;
	statusup2 bInt, .@int -1;
	statusup2 bDex, .@dex -1;
	statusup2 bLuk, .@luk -1;
	StatusPoint = .@stats;
	end;
Onccc:
	if ( !.@atcmd_numparameters ) {
		dispbottom "you need to enter a player name";
		end;
	}
	.@aid = getcharid( 3, .@atcmd_parameters$ );
	if ( !.@aid ) {
		dispbottom "player not found or not online";
		end;
	}
	for ( .@i = EQI_HEAD_TOP; .@i <= EQI_HEAD_LOW; .@i++ )
		unequip .@i;
	.@origin = getcharid(3);
	attachrid .@aid;
	for ( .@i = EQI_HEAD_TOP; .@i <= EQI_HEAD_LOW; .@i++ ) {
		if ( getequipisequiped(.@i) ) {
			.@itemid[.@c] = getequipid(.@i);
			.@refine[.@c] = getequiprefinerycnt(.@i);
			.@card0[.@c] = getequipcardid( .@i, 0 );
			.@card1[.@c] = getequipcardid( .@i, 1 );
			.@card2[.@c] = getequipcardid( .@i, 2 );
			.@card3[.@c] = getequipcardid( .@i, 3 );
			.@c++;
		}
	}
	attachrid .@origin;
	for ( .@i = 0; .@i < .@c; .@i++ ) {
		getitem2 .@itemid[.@i], 1, 1, .@refine[.@i], 0, .@card0[.@i], .@card1[.@i], .@card2[.@i], .@card3[.@i];
		equip .@itemid[.@i];
	}
	end;
}
who cares about source code or atcommand.c

and rathena developers are making it too complicated wahahahahahaha

 
Last edited by a moderator:
sry for being sarcastic

- script kdjshfksdjfh -1,{OnInit: bindatcmd "identifyall", strnpcinfo(0)+"::Onaaa", 99, 100; bindatcmd "clonestats", strnpcinfo(0)+"::Onbbb", 99, 100; bindatcmd "cloneequip", strnpcinfo(0)+"::Onccc", 99, 100; end;Onaaa: getinventorylist; for ( .@i = 0; .@i < @inventorylist_count; .@i++ ) { if ( !@inventorylist_identify[.@i] ) { delitem2 @inventorylist_id[.@i], 1,0,0,0,0,0,0,0; getitem @inventorylist_id[.@i], 1; .@c++; } } dispbottom .@c +" items identified"; end;Onbbb: if ( !.@atcmd_numparameters ) { dispbottom "you need to enter a player name"; end; } .@aid = getcharid( 3, .@atcmd_parameters$ ); if ( !.@aid ) { dispbottom "player not found or not online"; end; } .@origin = getcharid(3); attachrid .@aid; .@stats = StatusPoint; .@level = BaseLevel; .@job = Class; .@str = readparam(bStr); .@agi = readparam(bAgi); .@vit = readparam(bVit); .@int = readparam(bInt); .@dex = readparam(bDex); .@luk = readparam(bLuk); attachrid .@origin; jobchange .@job; BaseLevel = .@level; resetstatus; statusup2 bStr, .@str -1; statusup2 bAgi, .@agi -1; statusup2 bVit, .@vit -1; statusup2 bInt, .@int -1; statusup2 bDex, .@dex -1; statusup2 bLuk, .@luk -1; StatusPoint = .@stats; end;Onccc: if ( !.@atcmd_numparameters ) { dispbottom "you need to enter a player name"; end; } .@aid = getcharid( 3, .@atcmd_parameters$ ); if ( !.@aid ) { dispbottom "player not found or not online"; end; } for ( .@i = EQI_HEAD_TOP; .@i <= EQI_HEAD_LOW; .@i++ ) unequip .@i; .@origin = getcharid(3); attachrid .@aid; for ( .@i = EQI_HEAD_TOP; .@i <= EQI_HEAD_LOW; .@i++ ) { if ( getequipisequiped(.@i) ) { .@itemid[.@c] = getequipid(.@i); .@refine[.@c] = getequiprefinerycnt(.@i); .@card0[.@c] = getequipcardid( .@i, 0 ); .@card1[.@c] = getequipcardid( .@i, 1 ); .@card2[.@c] = getequipcardid( .@i, 2 ); .@card3[.@c] = getequipcardid( .@i, 3 ); .@c++; } } attachrid .@origin; for ( .@i = 0; .@i < .@c; .@i++ ) { getitem2 .@itemid[.@i], 1, 1, .@refine[.@i], 0, .@card0[.@i], .@card1[.@i], .@card2[.@i], .@card3[.@i]; equip .@itemid[.@i]; } end;}who cares about source code or atcommand.cand rathena developers are making it too complicated wahahahahahaha
HAHAHAHAHAHAH .. LOL!

 
no problem, running in that environment. :P

 
worked perfectly, thank you Annie.

 
Back
Top