Jump to content

punit

Members
  • Posts

    3
  • Joined

  • Last visited

Profile Information

  • Gender
    Male
  • Location
    india

Recent Profile Visitors

920 profile views

punit's Achievements

Poring

Poring (1/15)

  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

0

Reputation

  1. u r mine man dude thx a lots you are very good at your work No.1 prontera,96,231,6 script Trader 999,{ // Remove Previous Arrays @arrays only clear on relog deletearray @inventorylist_id[0], @inventorylist_count; deletearray @inventorylist_amount[0], @inventorylist_count; deletearray @inventorylist_refine[0], @inventorylist_count; deletearray @inventorylist_card1[0], @inventorylist_count; deletearray @inventorylist_card2[0], @inventorylist_count; deletearray @inventorylist_card3[0], @inventorylist_count; deletearray @inventorylist_card4[0], @inventorylist_count; getinventorylist; .@overcharge_lv = getskilllv( "MC_OVERCHARGE" ); if( .@overcharge_lv ) .@overcharge_rate = 105 + ( 2 * .@overcharge_lv ) - ( ( .@overcharge_lv >= 10 )? 1:0 ); while( .@i < @inventorylist_count ){ if( !@inventorylist_equip[.@i] ){ .@item_sell_price = getiteminfo( @inventorylist_id[.@i],1 ); if( .@overcharge_lv ) .@item_sell_price = ( ( .@item_sell_price * .@overcharge_rate ) / 100 ); mes " > "+getitemname( @inventorylist_id[.@i] )+" : "+.@item_sell_price+"z"; .@cost += .@item_sell_price; } .@i++; } if( .@cost ){ if( select( "Sell all items for "+.@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 "Gained "+.@cost+" zeny."; specialeffect2 563; } }else{ mes "You dont have any Items to sell."; } close; }
  2. what am i doing wrong? case 1: mes "[Trader]"; mes "Please remove your items from inventory which u want and store them safe!"; next; switch(select("I know:Thx for help")) { case 1: deletearray @inventorylist_id; deletearray @inventorylist_amount; getinventorylist(); for(set .@i, 0; .@i < @inventorylist_count; set .@i, .@i + 1); set .@payment, .@payment + getiteminfo(@inventorylist_id[.@i], 1) * @inventorylist_amount[.@i]; atcommand "@itemreset "; set Zeny, Zeny + .@payment; end; case 2: mes "[Trader]"; mes "Talk to me again when you are ready"; close; } does nothing just removes the item but no zeny changes are made can anyone help me!!
  3. #include <stdio.h> #include <string.h> #include <stdlib.h> #include "../common/HPMi.h" #include "../common/mmo.h" #include "../common/socket.h" #include "../common/malloc.h" #include "../map/map.h" #include "../map/pc.h" #include "../map/skill.h" #include "../map/script.h" #include "../map/status.h" /* works like bDelayRate */ /* example: cooldown is 10000 (10s) */ /* 'bonus bCoolDownRate,50;' = 15000 (15s) (+50%) */ /* 'bonus bCoolDownRate,-50;' = 5000 (5s) (-50%) */ HPExport struct hplugin_info pinfo = { "bCoolDownRate",// Plugin name SERVER_TYPE_MAP,// Which server types this plugin works with? "0.1", // Plugin version HPM_VERSION, // HPM Version (don't change, macro is automatically updated) }; int bCoolDownRateID = -1; struct s_cooldown_rate { int rate; }; /* to check for the bonus */ int skill_blockpc_start_preHook(struct map_session_data *sd, uint16 *skill_id, int *tick, bool *load) { struct s_cooldown_rate *data; if( *tick > 1 && sd && (data = HPMi->getFromMSD(sd,HPMi->pid,0)) ) { if( data->rate != 100 ) *tick = *tick * data->rate / 100; } return 1;/* doesn't matter */ } /* to set the bonus */ int pc_bonus_preHook(struct map_session_data *sd,int *type,int *val) { if( *type == bCoolDownRateID ) { struct s_cooldown_rate *data; if( !(data = HPMi->getFromMSD(sd,HPMi->pid,0)) ) {/* don't have, create */ CREATE(data,struct s_cooldown_rate,1);/* alloc */ data->rate = 100;/* 100% -- default */ HPMi->addToMSD(sd,data,HPMi->pid,0,true);/* link to sd */ } data->rate += *val; hookStop();/* don't need to run the original */ } return 0; } /* to reset the bonus on recalc */ int status_calc_pc_preHook(struct map_session_data* sd, bool *first) { struct s_cooldown_rate *data; if( (data = HPMi->getFromMSD(sd,HPMi->pid,0)) ) { data->rate = 100;//100% -- default } return 1;/* doesn't matter */ } HPExport void plugin_init (void) { /* need those interfaces */ iMalloc = GET_SYMBOL("iMalloc"); map = GET_SYMBOL("map"); script = GET_SYMBOL("script"); status = GET_SYMBOL("status"); /* grab a unique bonus ID for us */ bCoolDownRateID = map->get_new_bonus_id(); /* set constant 'bCoolDownRate', and set value to bCoolDownRateID */ script->set_constant("bCoolDownRate", bCoolDownRateID, false); /* hook */ addHookPre("skill->blockpc_start",skill_blockpc_start_preHook); addHookPre("pc->bonus",pc_bonus_preHook); addHookPre("status->calc_pc_",status_calc_pc_preHook); }
×
×
  • Create New...