Timokha
-
Content Count
48 -
Joined
-
Last visited
Posts posted by Timokha
-
-
On 9/13/2020 at 12:24 PM, rabmaster said:its not work
arealoot.c:17:10: fatal error: ../common/malloc.h: No such file or directory
#include "../common/malloc.h"The plugin is perfectly working on the latest HERC.
Check and use this code:
https://github.com/dastgirp/HPM-Plugins/blob/master/src/plugins/%40arealoot.c
And do not forget to mention the plugin name in \conf\plugins.conf
-
Bump.
-
Hello,
I am adding account ID to the variable by the following scripts:
set $MY_VARIABLE[0], getcharid(3);
set $MY_VARIABLE[getarraysize($MY_VARIABLE)], getcharid(3);
I have a list of values in this variable like:
2000000
2000001
2000002
etc
It indicates, that these accounts are participating in the game.
If the player fails, I need to delete it from this array, but cannot find the right script.
Could you please advise, how can I exclude the player from this variable, if he dies on my map for example?
OnPCDieEvent:
if (strcharinfo(3) == MY_EVENT_MAP)
{
????
dispbottom "Game over.";
} -
Solved it.
if (sd->npc_id > 0) return false;
-
Hello,
Could you please advise, how to disable @go command, when it used in NPC dialogue?
If I put @go 0 as example to quick slot ALT+1, it shall TP char to prontera even if it's in a dialogue.
I'd like to avoid that, cause many of my scripts were written without protections from such actions.
I've found out, that @refresh has this restriction.
In NPC dialogues @refresh just failed without any effect.
Thanks in advance.
-
Are there any updates on this plugin?
It shows ZERO values.
-
Any news?
-
Hi all,
Please advise on how to deactivate premium account.
I have to set variable #VIP to 0 automatically, when the time expires.
But I have no clue, how automatically in real time do that.
// SCRIPT // ... set #VIP, 1; set #VIP_delay, gettimetick(2) + 60; // 1 min ... }
When the time expires, the variable #VIP remain the same ( == 1 ).
I use if (gettimetick(2) < #VIP_delay) to show player, if the premium is still active.
But I have to set it to 0 to deactivate all benefits from Premium acc, otherwise it shall remain activated forever. ~
Highly appreciate your help.
-
7 hours ago, johnlincon said:In this case, it would be via \src\common\console.c
but for this file is more complicated
Found needed line in \src\common\\sql.c, works, thanks.
-
On 6/30/2021 at 12:59 PM, johnlincon said:\conf\global\console.conf
In this file you can edit your console.
Hello,
Thanks,
Is there a way to hide only these messages "pinging sql server to keep connection alive site"?
If I put "1" in console.conf it hides all INFO messages, including messages which I must receive.
-
-
Did anyone find a solution to change item name colors to black without changing the slots?
-
13 hours ago, astralprojection said:if(ACHIEVE_0001 == 1) {
That's was my misprint, but it changes nothing.
Does not work, when I log in.
Any ideas?
-
Hi all,
I'd like to add to my server achievement system that was presented in RO Mobile (Eternal Love).
Ok, close to it ~
Sample:
- Collect something (poring card and fabre card) get +1 str.
- Pass through 25 level of ET get +5 to DEF.
- Kill Drake get +1000 HP.
Do you have any good idea on how it should looks like.
I was thinking about below, but no effect in both cases.
- script sample -1,{ end; OnPCLoginEvent: if(ACHIEVE_0001 = 1) { bonus bStr,100; or autobonus "{ bonus bAllStats,100; }",100,10000,BF_WEAPON|BF_MISC,"{ specialeffect2 EF_FIRESPLASHHIT; }"; } }
Your assistance will be highly appreciated!~
-
7 hours ago, Racaae said:You can use OnTouchNPC.
map_name,200,214,5 script test 4_M_JOB_KNIGHT1,3,3,{ end; //Will trigger when a monster gets close OnTouchNPC: //gets the monster ID .@mob_id = getunitdata(mobattached(), UDT_CLASS); //checking if it's not a Poring, Zombie or Orc Warrior if (.@mob_id != 1002 && .@mob_id != 1015 && .@mob_id != 1023) { //kill the monster since it's not one of those killmonstergid mobattached(); } end; }
Thank you Racaae, highly appreciate your help!
-
Hi all,
I'd like to write the script, that will kill all monster (except for 2-3 IDs) with 2-3 cells area around NPC.
Do anyone have idea how it should look like?
I prepared loop event, but dont know how can I write auto-killing monster within this area..
Quotemap_name,200,214,5 script test 4_M_JOB_KNIGHT1,{
end;OnInit:
startnpctimer;
.@interval = 1;
while (1) {
sleep .@interval * 1000;
getmapxy .@map$,.@x,.@y, 1;// XY npc sample
for ( .@i = -4; .@i <= 4; .@i++ )// x
for ( .@j = -4; .@j <= 4; .@j++ )// y????
????
}
initnpctimer;
end;}
Thank you.
-
How to use these lines for skill_mob_db:
3254,T_W_O@WIDESTONE,chase,666,5,10000,500,20000,no,self,myhpltmaxrate,80,,,,,,,
3254,T_W_O@WIDESTONE,attack,666,5,10000,500,20000,no,self,myhpltmaxrate,80,,,,,,,
3254,T_W_O@NPC_WIDESOULDRAIN,attack,680,7,1000,500,5000,no,self,myhpltmaxrate,50,,,,,,42,
if my db looks like:
SCORPION: {
NPC_FIREATTACK: {
SkillState: "MSS_BERSERK"
SkillLevel: 1
Rate: 2000
Delay: 5000
Cancelable: true
SkillTarget: "MST_TARGET"
CastCondition: "MSC_ALWAYS"
} -
-
-
10 hours ago, Kuya Jeo said:Try to put another condition in this part
if( !@inventorylist_equip[.@i] ){
if( !@inventorylist_equip[.@i] ){
something like this.
if( !@inventorylist_equip[.@i] && getiteminfo( @inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_ETC){
if( !@inventorylist_equip[.@i] && getiteminfo( @inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_ETC){
i really dont test it. maybe just give it a try.
Thanks a lot, I highly appreciate your assistance.
May the Gods bless you!!
I've made it works.
If someone needs, below share complete script for bulk sell.
It ignores:
x Items with 0z cost (eg. customs items)
x Refined items
x Equiped items
Works only for:
x Junk (ETC)
x Weapon / Armor / Pet armor
SOLVED.
nss_dojo,211,222,4 script TestNPC 4_M_MAYOR,{ getinventorylist; set .@overcharge_lv, getskilllv( "MC_OVERCHARGE" ); if( .@overcharge_lv ) set .@overcharge_rate, 105 + ( 2 * .@overcharge_lv ) - ( ( .@overcharge_lv >= 10 )? 1:0 ); while( .@i < @inventorylist_count ){ if( !@inventorylist_equip[.@i] && getiteminfo( @inventorylist_id[.@i], ITEMINFO_SELLPRICE ) != 0 && !@inventorylist_refine[.@i] != 0 && (getiteminfo( @inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_ETC || getiteminfo( @inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_ARMOR || getiteminfo( @inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_PETARMOR || getiteminfo( @inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_WEAPON )) { set .@item_sell_price, getiteminfo( @inventorylist_id[.@i],1 ); if( .@overcharge_lv ) set .@item_sell_price, ( ( .@item_sell_price * .@overcharge_rate ) / 100 ); mes " > "+@inventorylist_amount[.@i]+ "x " +getitemname( @inventorylist_id[.@i] )+" : "+.@item_sell_price+"z"; .@cost += .@item_sell_price * @inventorylist_amount[.@i]; } .@i++; } if( .@cost ){ if( select( "Cost for all the Items - "+.@cost+" zeny?","Cancel" ) == 1 ){ .@i = 0; while( .@i < @inventorylist_count ){ if( !@inventorylist_equip[.@i] && getiteminfo( @inventorylist_id[.@i], ITEMINFO_SELLPRICE ) != 0 && !@inventorylist_refine[.@i] != 0 && (getiteminfo( @inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_ETC || getiteminfo( @inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_ARMOR || getiteminfo( @inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_PETARMOR || getiteminfo( @inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_WEAPON )) delitem @inventorylist_id[.@i],@inventorylist_amount[.@i]; .@i++; } specialeffect(367, AREA, playerattached()); specialeffect(10, AREA, playerattached()); Zeny += .@cost; mes "You received a total cost of "+.@cost+" zeny."; } } else{ mes "You don't have any items to sell."; } close; }
-
17 hours ago, Kuya Jeo said:Try this one, didnt test it yet.
mapname,100,100,4 script TestNPC 4_M_MAYOR,{ getinventorylist; set .@overcharge_lv, getskilllv( "MC_OVERCHARGE" ); if( .@overcharge_lv ) set .@overcharge_rate, 105 + ( 2 * .@overcharge_lv ) - ( ( .@overcharge_lv >= 10 )? 1:0 ); while( .@i < @inventorylist_count ){ if( !@inventorylist_equip[.@i] ){ set .@item_sell_price, getiteminfo( @inventorylist_id[.@i],1 ); if( .@overcharge_lv ) set .@item_sell_price, ( ( .@item_sell_price * .@overcharge_rate ) / 100 ); mes " > "+@inventorylist_amount[.@i]+ "x " +getitemname( @inventorylist_id[.@i] )+" : "+.@item_sell_price+"z"; .@cost += .@item_sell_price * @inventorylist_amount[.@i]; } .@i++; } if( .@cost ){ if( select( "Cost for all the Items - "+.@cost+" zeny?","Cancel" ) == 1 ){ .@i = 0; while( .@i < @inventorylist_count ){ if( !@inventorylist_equip[.@i] ) delitem @inventorylist_id[.@i],@inventorylist_amount[.@i]; .@i++; } Zeny += .@cost; mes "You received a total cost of "+.@cost+" zeny."; } } else{ mes "You don't have any items to sell."; } close; }
mapname,100,100,4 script TestNPC 4_M_MAYOR,{ getinventorylist; set .@overcharge_lv, getskilllv( "MC_OVERCHARGE" ); if( .@overcharge_lv ) set .@overcharge_rate, 105 + ( 2 * .@overcharge_lv ) - ( ( .@overcharge_lv >= 10 )? 1:0 ); while( .@i < @inventorylist_count ){ if( !@inventorylist_equip[.@i] ){ set .@item_sell_price, getiteminfo( @inventorylist_id[.@i],1 ); if( .@overcharge_lv ) set .@item_sell_price, ( ( .@item_sell_price * .@overcharge_rate ) / 100 ); mes " > "+@inventorylist_amount[.@i]+ "x " +getitemname( @inventorylist_id[.@i] )+" : "+.@item_sell_price+"z"; .@cost += .@item_sell_price * @inventorylist_amount[.@i]; } .@i++; } if( .@cost ){ if( select( "Cost for all the Items - "+.@cost+" zeny?","Cancel" ) == 1 ){ .@i = 0; while( .@i < @inventorylist_count ){ if( !@inventorylist_equip[.@i] ) delitem @inventorylist_id[.@i],@inventorylist_amount[.@i]; .@i++; } Zeny += .@cost; mes "You received a total cost of "+.@cost+" zeny."; } } else{ mes "You don't have any items to sell."; } close; }
Thank you.
It works well, but it sells all items including cards and items, that should not (can't) be sold.
That's why I use //ITEMINFO_TYPE ) == IT_WEAPON/ARMOR/ETC// in my script.
I'm looking for a script, which will sell all items, expect for cards, usable, healing items, and some IDs from my list.
-
Hello All,
Could you please help me.
I'd like to make below script scans and ignores all equiped items on the characters.
Now it deletes all items, including equiped.
I also want to include function to ignore specific item IDs.
Might be someone can help me with below or have alternative script with bulk selling, working with Hercules?
Thanks in advace,
nss_dojo,209,222,4 script Bulk_sell 1_M_MERCHANT,{ disable_items; getinventorylist; for ( .@i = 0; .@i < @inventorylist_count; ++.@i ) { if ( getiteminfo( @inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_ETC ) { .@id[.@c] = @inventorylist_id[.@i]; .@amount[.@c] = @inventorylist_amount[.@i]; .@zeny_total += getiteminfo( .@id[.@c], ITEMINFO_SELLPRICE ) * .@amount[.@c] *(100 + .Overcharge[ getskilllv(MC_OVERCHARGE)] )/100; ++.@c; } } for ( .@i = 0; .@i < @inventorylist_count; ++.@i ) { // if ( getiteminfo( !@inventorylist_equip[.@i], ITEMINFO_TYPE ) == IT_WEAPON ) { // if ( getiteminfo( !@inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_WEAPON ) { if( !@inventorylist_equip[.@i] && getiteminfo ( !@inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_WEAPON ){ .@id[.@c] = @inventorylist_id[.@i]; .@amount[.@c] = @inventorylist_amount[.@i]; .@zeny_total += getiteminfo( .@id[.@c], ITEMINFO_SELLPRICE ) * .@amount[.@c] *(100 + .Overcharge[ getskilllv(MC_OVERCHARGE)] )/100; ++.@c; } } for ( .@i = 0; .@i < @inventorylist_count; ++.@i ) { if ( getiteminfo( @inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_PETARMOR ) { .@id[.@c] = @inventorylist_id[.@i]; .@amount[.@c] = @inventorylist_amount[.@i]; .@zeny_total += getiteminfo( .@id[.@c], ITEMINFO_SELLPRICE ) * .@amount[.@c] *(100 + .Overcharge[ getskilllv(MC_OVERCHARGE)] )/100; ++.@c; } } for ( .@i = 0; .@i < @inventorylist_count; ++.@i ) { if ( getiteminfo( @inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_ARMOR ) { .@id[.@c] = @inventorylist_id[.@i]; .@amount[.@c] = @inventorylist_amount[.@i]; .@zeny_total += getiteminfo( .@id[.@c], ITEMINFO_SELLPRICE ) * .@amount[.@c] *(100 + .Overcharge[ getskilllv(MC_OVERCHARGE)] )/100; ++.@c; } } if ( !.@c ) { mes "nothing to sell"; close; } mes "are you sure to sell :"; for ( .@i = 0; .@i < .@c; ++.@i ) mes .@amount[.@i] +"x "+ getitemname(.@id[.@i]); mes "в сумме за "+ F_InsertComma(.@zeny_total) +" Зени ?"; next; if ( select( "Yes", "No" ) == 2 ) close; if ( Zeny + .@zeny_total > MAX_ZENY ) { mes "you cannot carry much more zeny."; close; } for ( .@i = 0; .@i < .@c; ++.@i ) delitem .@id[.@i], .@amount[.@i]; specialeffect(367, AREA, playerattached()); specialeffect(10, AREA, playerattached()); mes "All items have been sold for "+ F_InsertComma(.@zeny_total) +" z"; Zeny += .@zeny_total; close; OnInit: setarray .Overcharge[0], 0, 7,9,11,13,15,17,19,21,23,24; end; }
Special effect on all players at map
in Script Support
Posted
Hello all!
Can you please advise, is there a solution to apply special effect on all characters located on specific map via script (ex. in Prontera)?