Jump to content

Enthr

Members
  • Posts

    88
  • Joined

  • Last visited

Posts posted by Enthr

  1. Hi Luan, i think that your code is from Hercules and not from Rathena, i recommend to see the npc_click function in npc.c

    int npc_click(struct map_session_data* sd, struct npc_data* nd)
    {
    	nullpo_retr(1, sd);
    
    	if (sd->npc_id != 0) {
    		ShowError("npc_click: npc_id != 0\n");
    		return 1;
    	}
    
    	if(!nd) return 1;
    	if ((nd = npc_checknear(sd,&nd->bl)) == NULL)
    		return 1;
    	//Hidden/Disabled npc.
    	if (nd->class_ < 0 || nd->sc.option&(OPTION_INVISIBLE|OPTION_HIDE))
    		return 1;
    	
    	switch(nd->subtype) {
    		case NPCTYPE_SHOP:
    			clif_npcbuysell(sd,nd->bl.id);
    			break;
    		case NPCTYPE_CASHSHOP:
    		case NPCTYPE_ITEMSHOP:
    		case NPCTYPE_POINTSHOP:
    			clif_cashshop_show(sd,nd);
    			break;
    		case NPCTYPE_MARKETSHOP:
    #if PACKETVER >= 20131223
    			 {
    				unsigned short i;
    
    				for (i = 0; i < nd->u.shop.count; i++) {
    					if (nd->u.shop.shop_item[i].qty)
    						break;
    				}
    
    				if (i == nd->u.shop.count) {
    					clif_messagecolor(&sd->bl, color_table[COLOR_RED], msg_txt(sd, 534), false, SELF);
    					return false;
    				}
    
    				sd->npc_shopid = nd->bl.id;
    				clif_npc_market_open(sd, nd);
    			}
    #endif
    			break;
    		case NPCTYPE_SCRIPT:
    			run_script(nd->u.scr.script,0,sd->bl.id,nd->bl.id);
    			break;
    		case NPCTYPE_TOMB:
    			run_tomb(sd,nd);
    			break;
    	}
    
    	return 0;
    }

    you can see here all the things you need

    • Upvote 1
  2. It's not implemented by default, so there is not an existing command for that, but, what might do the trick is to spawn an invisible monster in the coordinates saving the GID, and then  do specialeffect 14,AREA,.@gid; then delete the monster.

     

  3. 2 hours ago, Mikoto Suoh said:

    im looking for a working bot for ROPH 2017, I manage to log in but I need some rev packets continue. gonna share it too if I find a reliable source. Thanks

    Hi, this is not the forum you are looking for.

    I think that nobody will post that information here, and it might be deleted.

    How @sader1992 said, you will be more lucky on the openkore forum, but, in my advice, its never recommended to use bots.

  4. Hi! 
    Reading the docs is always a good practice and you might find your answer much faster.
    You can find them in your server folder under the doc folder, the one that interest you is the item_db.txt
    There is an example of how an item is made and all of his parameters, you will see at the end this lines:

    	Script: <"
    		Script
    		(it can be multi-line)
    	">
    	OnEquipScript: <" OnEquip Script (can also be multi-line) ">
    	OnUnequipScript: <" OnUnequip Script (can also be multi-line) ">

    and the one that you want is this: 

    OnUnequipScript: <" OnUnequip Script (can also be multi-line) ">

    so, in your db/re/item_db.txt in the item you are using just change the script line to the OnUnequipScript one (if its not there, just add it) 

    • Upvote 1
  5. Hi, i just read the post and see your SS and could help to ask, because i only see just one connection in  hamachi. Its the client side joined to the hamachi server? You need to go to "join to an existing network" in the client side and enter the network name and password. 

    When you see two dots on the network you are going to be able to connect with the other machine

    (well, at least that is how it was before, i didnt used hamachi in some time)

  6. 5 hours ago, Cyro said:

    remove extra )

    ie

    if (instance_id (1)

     

    What are you telling him? this is completely wrong, the parenthesis are right, the problem is that he is putting semicolons on the value, or the value itself, because instance_id take no values, it have to be:

      

    if(instance_id()){

    like Christopher says.

  7. Hi!

    Overall, its a nice looking design, but it have the problem that when the grey letters go from one part of the background to another one (for example, top-right corner, the green figure), its difficult to read, also for the green text a little more downward.

    It have so much squares and the text its not accord to them, the background is not aligned or matched with the information, so, basically its nice and a "cool" background design, but have that factor that leave the impression that it is  wasnt done correctly

    Keep practicing and improving your work! ^_^

  8. On 26/3/2017 at 6:08 PM, iamkevin said:

    How to make this make a player need to pay using an item to summon a monster?

    How to set the time per mob?

    for example you want to summon lhz monster but you need to wait 4hours while the others be like 60mins, 1 and half hour, and 2 hour, etc?

     

    can be like this? thank you

    setarray .@MVP[0],1511,1785,1039,1874,2068,2253,1272,1719,1046,1389,1112,1115,1418;
    setarray .@MVPtimeMinute,60,50,40,30,20;
    setarray .@MBSS[0],1630;
    setarray .@MBSStimeMinute,60,50,40,30,20;

    Hi!

    Well, it cant be like that without more modification to the script, but if you want to, i will give you just what you need when i'm free

  9. Try with this, but its not tested

    - script PvP_System -1,{
    OnPCKillEvent:
      if(strcharinfo(3) != "pvp_y_1-2") end;
      if(@LastKilled == killedrid) end;
      set .@Killer,getcharid(3);
      set .@Killed,killedrid;
      detachrid;
      if(attachrid(.@Killed)){
        if(#CASHPOINTS){
          if(.hothour){
            dispbottom "You Lost 5 Cash Point from "+rid2name(.@Killer);
            set #CASHPOINTS,#CASHPOINTS-5;
          }
          else{
            dispbottom "You Lost 1 Cash Point from "+rid2name(.@Killer);
            set #CASHPOINTS,#CASHPOINTS-1;
          }
          emotion e_sob,1;
          detachrid;
          if(attachrid(.@Killer)){
            if(.hothour)
              dispbottom "You gained 5 Cash Points from "+rid2name(.@Killed);
            else
              dispbottom "You Gained 1 Cash Points from "+rid2name(.@Killed);
            emotion e_meh,1;
            if(.hothour)
              #CASHPOINTS += 5;
            else
             set #CASHPOINTS,#CASHPOINTS+1;
            set @LastKilled,.@Killed;
            attachnpctimer;
            initnpctimer;
          }
        } 
        else {
          emotion e_sob,1;
          detachrid;
          if(attachrid(.@Killer)){
           dispbottom "Sorry no cash points on the "+rid2name(.@Killed);
           emotion e_meh,1;
           set @LastKilled,.@Killed;
           attachnpctimer;
           initnpctimer;
          }
        }
      }
      end;
    OnTimer180000:
      set @LastKilled,0;
      stopnpctimer;
      detachnpctimer;
      end;
    
      OnSun1700:
        .hothour = 1;
        announce "The PVP HOT Hour has begin.",0;
        end;
      OnSun1800:
        .hothour = 0;
        announce "The PVP HOT Hour has finish.",0;
        end;
    }
    

    PD: I put the day Sunday at 17:00, but you can change it in the end to the day and hour that you want, and the second one, (sunday at 18:00 its when you turn off this)

  10. Beside That you have a problem with the name of a kafra, your server its already running! Its ready and you can test to log in it. (if you cant login see the logserver console and post what it says here. If it dont say anything you have not configurate it correctly t he client)

  11. ¿How many zeny do you want to ask?


    But, try with this (not tested)

    prontera,147,166,5	script	Reseter	407,{
    set .name$, "[Reseter]";
    if (BaseLevel <= 20) {
    	mes .name$;
    	mes "Reset Stat & Skills will cost you 1,000z, want it to reset?";
    	next;
    	if (select("Yes:No") == 2) close;
    	if (Zeny >= 1000) {
    		set Zeny, Zeny - 1000;
    		callfunc "Reset1";
    	} // End if
    } else if (BaseLevel > 20 && BaseLevel <= 40) {
    	mes .name$;
    	mes "Reset Stat & Skills will cost you 1x Premium Reset Stone and 5,000z, want it to reset?";
    	next;
    	if (select("Yes:No") == 2) close;
    	if (countitem(6320) < 1) goto L_noitem;
    	if (Zeny >= 5000) {
    		set Zeny, Zeny - 5000;
    		callfunc "Reset1";
    	} // End if
    } else if (BaseLevel > 40 && BaseLevel <= 80) {
    	mes .name$;
    	mes "Reset Stat & Skills will cost you 1x Premium Reset Stone and 40,000z, want it to reset?";
    	next;
    	if (select("Yes:No") == 2) close;
    	if (countitem(6320) < 1) goto L_noitem;
    	if (Zeny >= 40000) {
    		set Zeny, Zeny - 40000;
    		callfunc "Reset1";
    	} // End if
    } else if (BaseLevel > 80) {
    	mes .name$;
    	mes "Reset Stat & Skills will cost you 1x Premium Reset Stone and 1,000,000z want it to reset?";
    	next;
    	if (select("Yes:No") == 2) close;
    	if (countitem(6320) < 1) goto L_noitem;
    	if (Zeny >= 1000000) {
    		set Zeny, Zeny - 1000000;
    		callfunc "Reset1";
    	} // End if
    	} // End if
    close;
    
    
    L_noitem:
    
    	mes "[Reseter Manager]";
    	mes "You dont have enough [Premium Reset Stone].";
    	close;
    
    } // End script
    
    function	script	Reset1	{
    	ResetStatus;
    	ResetSkill;
    	return;
    } // End function
    

    i lowered the zeny amount and the premium reset stone to 1

×
×
  • Create New...