Jump to content

sader1992

Content Moderator
  • Posts

    1678
  • Joined

  • Last visited

  • Days Won

    72

Posts posted by sader1992

  1. prontera,0,0,0	script	npc_name	444,{
    	if($MAX_LEVEL_REWARDS_50 < 50){
    		if(!#MAX_LEVEL_REWARDS_50){
    			if(BaseLevel == 99){
    				mes "you can redeem the reward once per account!";
    				if(select("redeem with this char:close") == 2)
    					end;
    				#MAX_LEVEL_REWARDS_50 = true;
    				$MAX_LEVEL_REWARDS_50++;
    				mes "you got the reward!";
    				announce "Player '" + strcharinfo(0) + "' has redeemed his max level reward!",0;
    				//===========================
    				getitem 502,1;//add what you want to give like this.
    				
    				//===========================
    				close;
    			}else{
    				mes "you are not at the max level!";
    				close;
    			}
    		}else{
    			mes "you alewady redeemed the reward with another char!";
    			close;
    		}
    		
    	}else{
    		mes "All the rewards has been redeemed!";
    		close;
    	}
    }

     

  2. replace 

    MAX_LEVEL

    with a number , the max level you have 

    for example if 99

    prontera,0,0,0	script	npc_name	444,{
    	if($MAX_LEVEL_REWARDS_50 < 50){
    		if(!#MAX_LEVEL_REWARDS_50){
    			if(BaseLevel == 99){
    				mes "you can redeem the reward once per account!";
    				if(select("redeem with this char:close") == 2)
    					end;
    				#MAX_LEVEL_REWARDS_50 = true;
    				$MAX_LEVEL_REWARDS_50++;
    				mes "you got the reward!";
    				announce "Player '" + strcharinfo(0) + "' has redeemed his max level reward!",0;
    				//===========================
    				getitem 502,1;//add what you want to give like this.
    				
    				//===========================
    			}else{
    				mes "you are not at the max level!";
    				close;
    			}
    		}else{
    			mes "you alewady redeemed the reward with another char!";
    			close;
    		}
    		
    	}else{
    		mes "All the rewards has been redeemed!";
    		close;
    	}
    }

     

  3. if you really want to make Zeny high value , limit the amount of Zeny that the players can obtain per time (like limit per day or week[BTW no one like limits]), and make players have to use the Zeny with Npcs/system or anything , if your implementation is right good for you , you just saved your self a lot

    if your implementation was wrong or the players didn't like it , you will end up with an empty server

     

    The easier way is to create your own coin and balance it in a way to replace Zeny, in my opinion you can't balance Zeny without 180 degree changes from the start of the server (for example if you decide that no npc can by items they just sell items ,and you make Zeny obtainable in a more balanced and limited way) , ofc big ideas need too muck thinking before implementing!

  4. prontera,0,0,0	script	npc_name	444,{
    	if($MAX_LEVEL_REWARDS_50 < 50){
    		if(!#MAX_LEVEL_REWARDS_50){
    			if(BaseLevel == MAX_LEVEL){
    				mes "you can redeem the reward once per account!";
    				if(select("redeem with this char:close") == 2)
    					end;
    				#MAX_LEVEL_REWARDS_50 = true;
    				$MAX_LEVEL_REWARDS_50++;
    				mes "you got the reward!";
    				announce "Player '" + strcharinfo(0) + "' has redeemed his max level reward!",0;
    				//===========================
    				getitem 502,1;//add what you want to give like this.
    				
    				//===========================
    			}else{
    				mes "you are not at the max level!";
    				close;
    			}
    		}else{
    			mes "you alewady redeemed the reward with another char!";
    			close;
    		}
    		
    	}else{
    		mes "All the rewards has been redeemed!";
    		close;
    	}
    }

     

  5. 2 hours ago, JamesWindsor said:

    saders tool creates all the folders and sub folders where they should be so i'd imagine its correct.

    try to add in in data\luafiles514\lua files\transparentItem\transparentItem.lub too

    { 5125525525500 },

    the tool was built before this file

    • MVP 1
  6. F_Rand returns a random number

    not a random item nor a random count

    and float is not valid for rathena script language

    so ifyou want to use the function , it's like this

    .@id = callfunc ("F_Rand", 603,617,503,502); 

    getitem .@id,1;

    so it would be random from these set of numbers

    //////////////////////////////////////////////////////////////////////////////////
    // Returns a random argument.
    // -- callfunc "F_Rand",arg0,arg1,...
    // Example:
    //    // You can use it to pick a random number from a list:
    //    set @itemIDfromList, callfunc("F_Rand",1129,1222,1163,1357,1360,1522,1811,1410);
    //////////////////////////////////////////////////////////////////////////////////
    function	script	F_Rand	{
    	return getarg(rand(getargcount()));
    }

     

  7. 20 hours ago, ideattracta said:

    hi there sir.. 

    i m trying to use this script, which is so amazing...

     

    but i got a problem tho. when i tried to input the item id it keep saying that the item id was wrong. i got all the database set up..

    i am not using gepard by the way.. what should i do ?

    it has nothing to do with the database

    "getitemname( @s_Item_id[.@i] ) == "null""

    mean if the item has no name than it's invalid item

  8. 10 minutes ago, BFPkiller said:

    @sader1992
    it compiles fine in build folder yet i get this when starting the server and cant login game

    
    Heartbeat ACK: {"d":null,"op":11,"s":null,"t":null}
    [2020-03-09 02:37:36] [info] asio async_read_at_least error: asio.ssl:335544539 (short read)
    [2020-03-09 02:37:36] [error] handle_read_frame error: websocketpp.transport:11 (Generic TLS related error)
    [2020-03-09 02:37:36] [info] asio async_write error: asio.ssl:336396495 (protocol is shutdown)
    [2020-03-09 02:37:36] [fatal] handle_write_frame error: websocketpp.transport:2 (Underlying Transport Error)
    [2020-03-09 02:37:36] [info] asio async_shutdown error: asio.ssl:335544539 (short read)
    Socket Init: -150
    TLS Init: -1021023349
    Close: 4465813
    [Debug]: {"d":null,"op":11,"s":null,"t":null}
    [Debug]: Waiting for heartbeat thread to finish!

     

    than your problem is fixed , you can ignore the debug messages if it work fine

    or you can ask here https://github.com/zaphoyd/websocketpp or search to fix those errors

  9. 5 hours ago, BFPkiller said:

    these are the only errors left ...

    i am sure that it not the case , the compiler stop at that error , so you don't see what after

    however , upload channel.cpp , if you get error after that , i will again tell you to track the changes and delete tham than re-apply

  10. try

    BUILDIN_FUNC(getskillname)
    {
    	int skill_id;
    	//get input skill_id
    	if (!script_hasdata(st, 2)) {
    		script_pushconststr(st, "null");
    		return SCRIPT_CMD_SUCCESS;
    
    	}
    	skill_id = script_getnum(st, 2);
    	if (!skill_get_index(skill_id)) {
    		ShowError("script:conv_str: Unknown skill_id supplied.\"\n");
    		script_pushconststr(st, "null");
    		return SCRIPT_CMD_SUCCESS;
    	}
    	script_pushstr(st, skill_db.find(skill_id)->desc);
    	return SCRIPT_CMD_SUCCESS;
    }

     

  11. try this

    prontera,0,0,0	script	tttest	444,{
    	if(getarraysize($FIRSTREWARDNPC_IPs$) < 20){
    		if(inarray($FIRSTREWARDNPC_IPs$,getcharip()) !=-1 && !#FIRSTREWARDNPC){
    			$FIRSTREWARDNPC_IPs$[getarraysize($FIRSTREWARDNPC_IPs$)] = getcharip();
    			#FIRSTREWARDNPC = true;
    			getitem 502,1;
    			mes "you got a reward!";
    			close2;
    			callsub OnInit;
    			end;
    		}else{
    			mes "you already got the reward";
    			close;
    		}
    	}
    end;
    OnInit:
    	if(getarraysize($FIRSTREWARDNPC_IPs$) => 20){
    		hideonnpc strnpcinfo(3);
    	}
    end;
    }

     

×
×
  • Create New...