Jump to content

kairu

Members
  • Content Count

    23
  • Joined

Posts posted by kairu


  1. As the title says can we get a seperate log for this? in a way that we can track who bought what item, and also a way to disable #KAFRAPOINTS if possible?

    thanks!


  2. So.. a follow up on this..

    has there been any solution for it?

    because i need a higher heal rate value above 32767.

    if possible would you mind showing me where in the hex editor to change the limit?

    gratefully appreciated!

    Edit: its actually about the life potions(SC_M_LIFEPOTION) where it heals a percentage of your life per x interval. it is limited to only 32767 while Heal on acolyte is working fine

    Edit2: Drop this i just set the flag to not show the healed amount. thanks for reading!


  3. On 6/16/2017 at 9:14 AM, Easycore said:

    Open src/map/trade.c, find:

    
    // save both player to avoid crash: they always have no advantage/disadvantage between the 2 players
    	if (map->save_settings&1) {
    		chrif->save(sd,0);
    		chrif->save(tsd,0);
    	}

    Add below:

    
    	npc->event_doall_id( "OnTradeEvent", sd->bl.id );
    	npc->event_doall_id( "OnTradeEvent", tsd->bl.id );

     

    Test NPC:

    
    -	script	TradeTest	FAKE_NPC,{
    
    OnTradeEvent:
    	mes "Hello, world!";
    	close;
    }

     

    Thanks! i will try this one when i get back... is there also a way to pass arguments/variables into the script?


  4. This may probably be moved to the source support section.

    Heres an update/work around of it for now:

    i went in and inputted the items that will be having the hidden abilities in itemdb.h

    ofcourse i have declared the missing ones and included sql and inter files.

    nameid = sd->status.inventory[index].nameid;
    	 if(itemdb_is_cweapon(nameid)){
    		 unique_id = sd->status.inventory[index].unique_id;
    		 if(SQL_ERROR == SQL->Query(inter->sql_handle, "SELECT `description` FROM `randombonus` WHERE `unique_id`='%s'", unique_id)){
    			Sql_ShowDebug(inter->sql_handle);
    		 }
    		else{
    			 char str[500];
    			SQL->GetData(inter->sql_handle, 1, &data, NULL); str[0] = data;
    			clif->disp_message(&(sd)->bl,str,CHAT);
    			SQL->FreeResult(inter->sql_handle);
    		 }
    	 }

    The problem now is im stuck of the error it gives and i dont know what to do with it next.

    Capture.JPG


  5. 1 hour ago, meko said:

    It's just that there's likely another way to accomplish what they try to do without modifying the source or making a plugin. But for that we need to know what the original intent is.

    i basically have a randomized skill system where equipments give skills and/or stats etc.. so id like players to know what they got on it and if theyre going to trade it to another player it shows them. so if they put in the item on the trade window theres a dispbottom that shows the hidden attributes.


  6.  

     

    There's already bonus2 bHPRegenRate/bSPRegenRate which do exactly that. Check the documentation.

     

    oh i didnt see that however can it be percentage of your max hp instead?

     

    Yup.
    bonus2 bHPRegenRate, (MaxHp/100), 1000;
    This script would drain 1% of max hp every 1000ms (1 second).

     

    it should gain 1% every 1s. But thanks i understand now next problem is how long it will linger; was going to put this in ygg berries changing it instead of instant healing to overtime healing. like lets say if you use the berry you would heal 3% of your max hp every 1second for 5second linger time. is it possible still with this item bonus?

     

    sorry for being unspecific.


  7. does anyone have a src code for heal over time like Renovatio skill on Arch bishop does? however the tick rate is configurable so maybe it'll work like an item bonus code like bonus3 bHealOverTime,x,y,z; where x= hp; y= sp; z= tick rate;

     

    Also does this increase the server load? i feel like ticks plays a heavy role on it.


  8.  

    I made an item call a function which have player interaction to choose on a menu but it gets the error npc_scriptcont: failed npc->checknear test.

     

    Heres an example of it:

    Item id of Knife -> 1202

    with script on it as:

    callfunc "getSkill";

     

    and the gist of the function of:

    function	script	getSkill	{
    	attachrid(getcharid(3));
    			retryRK:
    					dispbottom "Select a Skill you want.";
    					switch(select("Enchant Blade:Sonic Wave:Death Bound")){
    						case 1: 
    							.@r = 1;
    							break;
    						case 2: 
    							.@r = 2;
    							break;
    						case 3: 
    							.@r = 3;
    							break;
    						default:
    							goto(retryRK);
    					}
    					close;
    <More code...>
    
     

    I'm just wondering if there's any fix to this http://herc.ws/board/tracker/issue-3720-failed-npc-checknear-test-on-item-equip-function/

    or any work around it.

    would greatly appreciate it!

    Menu without mes is always a problem.

    Try put mes before select, and see if original problem exists or not

    Also, you don't need to do attachrid in the code you posted above.

    I tried it with mes but its still the same. however, instead of "doevent" on the script i used addtimer and no more errors


  9. [Warning]: Unable to restore stack! Double continuation

    This mean some thing already runned. player can execute only one script at same time.

    Look like your Test npc script was run with attached player and you run another one script. This will not works

     

     

    The Test npc script is the one i called on doevent. it may have something to do with my other scripts but it should show what current script i have open it with.

     

    Edit: ive disabled all my custom scripts but still the same. It also crashes if i call the doevent on the item


  10. Hi, Thanks for replying i will try this tomorrow when i get up in bed and will let you know if it works. :)


    @kairu input interaction can works only with npc. You cant enter text for not attached npc.

    For fix this issue, you can use in your item use script

     

     

    doevent "servicenpc::OnUseMenu"
    
     

    And inside this npc and this label even you can add your code what will ask something from player.

     

    Also attachrid from usescript is useless, script should be already attached to player.

     

    i tried to do this but i got errors saying this:

     

    [Warning]: Unable to restore stack! Double continuation
    [Debug]: Previous script (lost):
    [Debug]: Current script:
    [Debug]: Source (NPC): Test (invisible/not on a map)


  11. I made an item call a function which have player interaction to choose on a menu but it gets the error npc_scriptcont: failed npc->checknear test.

     

    Heres an example of it:

    Item id of Knife -> 1202

    with script on it as:

    callfunc "getSkill";

     

    and the gist of the function of:

    function	script	getSkill	{
    	attachrid(getcharid(3));
    			retryRK:
    					dispbottom "Select a Skill you want.";
    					switch(select("Enchant Blade:Sonic Wave:Death Bound")){
    						case 1: 
    							.@r = 1;
    							break;
    						case 2: 
    							.@r = 2;
    							break;
    						case 3: 
    							.@r = 3;
    							break;
    						default:
    							goto(retryRK);
    					}
    					close;
    <More code...>
    

     

    I'm just wondering if there's any fix to this http://herc.ws/board/tracker/issue-3720-failed-npc-checknear-test-on-item-equip-function/

    or any work around it.

    would greatly appreciate it!

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.