-
Content Count
366 -
Joined
-
Last visited
-
Days Won
8
Content Type
Profiles
Forums
Downloads
Staff Applications
Calendar
Everything posted by Patskie
-
Help to put auto repair on my healer and indentify
Patskie replied to HisokaMachi's question in Script Support
or should i say efficient? -
Help to put auto repair on my healer and indentify
Patskie replied to HisokaMachi's question in Script Support
Probably an absurd answer : his while loop is much slightly faster than your for loop in terms of execution time -
https://code.google.com/p/fluxcp-ra/source/browse/branches/fluxcp-1.0/data/npc/DonationNPC.txt?spec=svn1070&r=1070
-
Help to put auto repair on my healer and indentify
Patskie replied to HisokaMachi's question in Script Support
getinventorylist;for( set .@i,0; .@i < @inventorylist_count; set .@i, .@i + 1 ) { if ( @inventorylist_identify[.@i] == 1 ) continue; delitem2 @inventorylist_id[.@i],1,0,0,0,0,0,0,0; getitem @inventorylist_id[.@i],1;}if ( !getbrokenid(1) ) close;atcommand "@repairall"; Add this -
prontera,150,150,0 script Sample 100,{ query_sql "SELECT DISTINCT(`account_id`) FROM `char` WHERE `online` = '1'",.@aid; for ( .@i = 0; .@i < getarraysize(.@aid); .@i++ ) { if ( attachrid( .@aid[.@i] ) ) { if ( strcharinfo(3) == "prontera" ) cutin "kafra_07", 2; } } for ( .@x = 3; .@x > 0; .@x-- ) { announce "Count down : " +.@x,0; sleep 1000; } for ( .@y = 0; .@y < getarraysize(.@aid); .@y++ ) { if ( attachrid( .@aid[.@y] ) ) { if ( strcharinfo(3) == "prontera" ) cutin "", 255; } } end;} Like this?
-
The delitem command is triggered when the item is not null otherwise it does nothing. though i can say a do while loop is a better approach
-
https://github.com/HerculesWS/Hercules/blob/master/npc/custom/card_remover.txt
-
prontera,150,150,0 script Sample 100,{ if ( !countitem( 7539 ) ) { mes "You need 1 " +getitemname( 7539 )+ " in order to talk to me"; close; } if ( select( "Here have my " +getitemname( 7539 )+ ":Nevermind" ) - 1 ) close; .@r = rand(501, 700); if ( getitemname( .@r ) != "null" ) { delitem 7539, 1; getitem .@r, 1; } close;}
-
The warning trigger when someone talk to npc and the player is far away from that npc.
-
R> npc that convert pods to cash / cash to pods / pcoin
Patskie replied to HisokaMachi's question in Script Requests
delitem 501, .@input; // replace 501 to POD item id. getitem 501, .@input; // replace 501 to poring coin item id. -
Do you use existing vip script? If so, show us
-
How to properly use array and using it as random?
Patskie replied to mybitch's question in Script Support
set $@rate,.@frate[rand(getarraysize(.@frate))]; -
if ( !Class && BaseLevel < 14 ) { // not allowed show some message or end the script }
-
Speechless! Did i really just saw 4 billion @_@ <3
-
Search sometimes http://herc.ws/board/topic/3665-hwsage-soul-link-modification/#entry24613. Regarding the LOV for SG. Someone release it. Have a look instead of waiting for an answer.
-
Players will only be attached to the npc whenever they talk to it or when the script execute certain labels or by using addrid or attachrid. In your case you put this line on OnInit label : .@player_name$ = "[^FF0000"+strcharinfo(0)+"^000000]"; Which means that when the script was loaded by the server it will assign the name of a player on the variable .@player_name$ ( in which case by default and by loaded i believe no player is currently talking to that npc ) Regarding the wrong case error. Maybe it was included in your other scripts. I am certain that the error does not belong to the script you are talking about in this topic. I just modified your script. Kindly test this one and tell me if it works : prontera,155,150,3 script TEST_NPC1 99,{ .@player_name$ = "[^FF0000"+strcharinfo(0)+"^000000]"; // No requirements for( .@i = 0; .@i < getarraysize(.qitem); .@i++ ) { if ( countitem( .qitem[.@i] ) < .qamt ) { // Dialogue if player does NOT have the required items already mes .npc_name$; mes "dialogue hereeeee."; mes "More hereeeee"; next; mes .@player_name$; mes "PC dialogue here"; next; if(select("Yes, please.:No, thank you.") == 2) { mes .npc_name$; mes "leaving message here"; close; } mes .npc_name$; mes "more dialogue"; next; mes .npc_name$; mes "Come back with:"; // List items for(.@i = 0; .@i < getarraysize(.qitem); .@i++) mes "^FF0000"+ .qamt +"x - "+ getitemname(.qitem[.@i]) +"^000000"; mes "...and I will give you the item."; close; } } // Has requirements mes .npc_name$; mes "congrats dialogue for gather items."; for( .@i = 0; .@i < getarraysize(.qitem); .@i++ ) delitem .qitem[.@i],.qamt; getitem .pitem,.pamt; close;OnInit: // Configuration // General .npc_name$ = "[^008800NPC_NAME^000000]"; // NPC's dialogue name // Items .pitem = 901; // Prize item for completing the quest .pamt = 1; // Prize item amount setarray .qitem[0], 501, 502, 503; .qamt = 1; // Quest item amount end;}
-
Line 3069 : if(sc && sc->data[SC_SOULLINK] && sc->data[SC_SOULLINK]->val2 == SL_STAR) { sd->right_weapon.addrace[RC_BOSS] += 100; sd->left_weapon.addrace[RC_BOSS] += 100; sd->right_weapon.addele[ELE_HOLY] += 100; sd->left_weapon.addele[ELE_HOLY] += 100;} Line 4821 : if(sc->data[SC_SOULLINK] && sc->data[SC_SOULLINK]->val2 == SL_STAR) flee2 += 10;
-
What is your preference damage? Reduce how many %? or what?
-
I have tried this and works fine on my test server. You can check it : src/map/status.c : Add ( Line 4212 ) : if(sc->data[SC_SOULLINK] && (sc->data[SC_SOULLINK]->val2 == SL_WIZARD || sc->data[SC_SOULLINK]->val2 == SL_SAGE)) vit += ((TBL_PC*)bl)->status.int_ / 5; Add ( Line 5564 ) : if(sc->data[SC_SOULLINK] && (sc->data[SC_SOULLINK]->val2 == SL_WIZARD || sc->data[SC_SOULLINK]->val2 == SL_SAGE)) maxhp += ((TBL_PC*)bl)->status.base_level * 200;
-
That command is already existing here https://github.com/HerculesWS/Hercules/blob/master/npc/other/Global_Functions.txt#L311 They are telling you that you might include another function same with that on any of your custom scripts ( duplicate ).
-
same with this http://herc.ws/board/topic/3692-freebies-but-not-npc/ isn't it?
-
Try : itemid,itemname,.........{ callfunc("Freebies",2357,2524,2115,2421); },{},{} /* callfunc( "Freebies",itemid{,itemid} ); */function script Freebies { for ( .@i = 0; .@i < getargcount(); .@i++ ) getitem getarg(.@i), 1; return;}