Jump to content

xienne15

Members
  • Content Count

    120
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by xienne15


  1. I want to request a mining script.

     

    This is how it works:

    1) The player should have Pick (ID:25000)

        if (countitem(25000 > 1) {
    It will mine different minerals with % chances

    Minerals

    25001 20% chance to get

    25002 50% chance to get

    25003 80% chance to get

    25004 2% chance to get

     

    there is also a chance that it will fail. 50%

     

    2) When the player mined 25001 it will say after mining

    mes "You successfully mined a 25001";close;

    and when the mined 25002 it will say

    mes "You successfully mined a 25002";close;

    and so on

     

    And when it failed to mine it will say

    mes "You failed to mine.";close;

    After each use of the Pick 25000, it will be deleted

    delitem 25000,1;

  2. I am going to try to reproduce this and find a solution for you pertaining to the High Jump on a custom map. 

     

    So I tested this on my custom made map and could not reproduce this issue you seem to be having, may I 

    ask what version of browedit your using also which emulator / revision and also if you tried using lower levels of 

    High Jump in case you happened to simply have a walkable cell within the 10 cell range. Also have you double 

    checked that the cells are indeed  not walkable ?

     

     

    As far as the second question about the creation of a sky map here is a great Video Guide that should help you out;

     

     

    I would like to note that if you are using a newer client the Hexing method does not seem to work properly. However,

    You can still simply overwrite any existing sky map, just rename your custom map to the name of the existing sky map

    and remove the old map from your grf.

    I am using BE r586

  3. How exactly did you save your work / recalculate, please list the steps you took.

    i do this

     

    1) add lightmaps with colors

    2) calculate lightmaps

    3) the lightmap appears in browedit

    4) click save

    5) add it to map cache

    6) logged in

    7) map has no lightmap i made. ><

     

    2d9wbrr.jpg


  4. Your left curly on line 61 is mismatched. It shouldn't even be there. Also, you're checking if the player has -1 of the item 26131; I think it's safe to assume you meant to check if the player had at least 1 of the item.

     

     

     

    if (countitem(26131) < 0) { goto noring;
     

    I could rant about why you shouldn't use goto, but to put it simply: it's just bad code - and wasn't used properly, at that. You can't (or shouldn't, if for some reason you can) use a goto within a function.

     

    Instead, remove the checks from each case and place it outside of the function call. I added the check after line 26, before the player is given the shop menu selection. You can replace the contents of the check's script with what you had in your noring label.

     

     

    mes "[Training Trader]";mes "Each shop use different training points acquired from your training";next;    // <- Line 26 [Via] .@coin = 26131;    // Coin item ID.@amount = 1;	  // Amount required // Check coinsif (countitem(.@coin) < .@amount) {    mes "[Training Trader]";    mes "You need at least "+ .@amount +" "+ getitemname(.@coin) +" to access these shops. Come back later.";    close;}

     

     

    i will not use goto now LOL

  5. im using this dynamic shop by emistry, but i tried to use goto function after each cases so it will go to

    if (countitem(26130) < 0) goto noring;noring:
    but its giving me error
    // Settings ://	-	Only required to edit the ShopSetting() Function//			Notes : You may also add / remove Menu ( If any ) //	-	Shop Currency can be either ItemID or Variable Name, but must write within Quotation Marks ( "" )//			Ex. of Variable.	->	Zeny , #CASHPOINTS , #KAFRAPOINTS , CustomVariable , #CustomVariable//	-	ERROR Message are used to show Invalid Settings in your NPC.// Leave this alone...-	shop	Emistry_Shop	-1,512:100bif_fild01,125,15,4	script	Training Trader	672,{function ShopSettings;function ValidateCost;function CurrencyInfo;function ClearData;function ValueConvert;function ErrorNotice;mes "[Training Trader]";mes "Hello~ I sell exclusive items using ^FF0000Training Points^000000.";next;mes "[Training Trader]";mes "Each shop use different training points acquired from your training";next;mes "[Training Trader]";mes "So use it well.~";mes "So,Which shop you would like to look at?";next;// Menu Selectionselect("Jump Training Shop","Other Training Shop");ClearData();ShopSettings( @menu );npcshopitem "Emistry_Shop",512,100;npcshopdelitem "Emistry_Shop",512;for(set .@i,0; .@i < getarraysize( @ItemLists ); set .@i,.@i+1)	npcshopadditem "Emistry_Shop",@ItemLists[.@i],@ItemCost[.@i];mes "Okay...wait awhile";mes "^00FF00____________________________^000000";CurrencyInfo( @Currency$ );mes "^00FF00____________________________^000000";callshop "Emistry_Shop",1;npcshopattach "Emistry_Shop";end;function	ShopSettings	{	switch( getarg(0) ){		Case 1:			if (countitem(26130) < 0) goto noring;			// Currency [ Item ID / Variable Name ]			set @Currency$,"JUMPPOINTS";			// Item ID Lists			setarray @ItemLists[0],12315,12303;			// Item Price			setarray @ItemCost[0],2500,1000;			break;		Case 2:			if (countitem(26131) < 0) { goto noring;			// Currency [ Item ID / Variable Name ]			set @Currency$,"OTHERPOINTS";			// Item ID Lists			setarray @ItemLists[0],12315,12303;			// Item Price			setarray @ItemCost[0],25,1;			break;		// Case 4,5,6.....etc...		default:			ErrorNotice( "Invalid Menu Selection for Menu "+@menu+"." );			close;}	if( @Currency$ == "" )	ErrorNotice( "Invalid Currency Setting in Menu "+@menu+" ." );if( getarraysize( @ItemCost ) != getarraysize( @ItemLists ) || getarraysize( @ItemLists ) != getarraysize( @ItemCost ) )	ErrorNotice( "Missing or Extra Value of Item or Cost Settings in Menu "+@menu+" ." );return;}function	ErrorNotice	{	mes "^FF0000ERROR^000000 - "+getarg(0);	mes "^00FF00____________________________^000000";	mes "Inform this Message to ^0000FFGame Staffs^000000 immediately !";	close;}function	CurrencyInfo	{	if( getitemname( atoi( getarg(0) ) ) != "null" ){		mes "Item Currency : ^FF0000"+getitemname( atoi( getarg(0) ) )+"^000000";		mes "Available Amount : ^0000FF"+ValueConvert( countitem( atoi( getarg(0) ) ) )+"^000000";	}else if( getitemname( atoi( getarg(0) ) ) == "null" ){		mes "Variable Currency : ^FF0000"+getarg(0)+"^000000";		mes "Available Amount : ^0000FF"+ValueConvert( getd( getarg(0) ) )+"^000000";	}return;}function	ValidateCost	{	if( getitemname( atoi( getarg(0) ) ) != "null" ){		if( countitem( atoi( getarg(0) ) ) < getarg(1) ) return 1;	}else{		if( getd( getarg(0) ) < getarg(1) ) return 1;	}return 0;}function ClearData	{	set @Currency$,"";	set @TotalCost,0;	deletearray @bought_nameid[0],getarraysize( @bought_nameid );	deletearray @bought_quantity[0],getarraysize( @bought_quantity );	deletearray @ItemLists[0],getarraysize( @ItemLists );	deletearray @ItemCost[0],getarraysize( @ItemCost );return;}function	ValueConvert	{	set .@num, atoi(""+getarg(0));	if ( .@num == 0 || .@num >= 2147483647 ) return getarg(0);	set .@l, getstrlen(""+.@num);	for ( set .@i,0; .@i < .@l; set .@i, .@i + 1 ) {		set .@num$, .@num % pow(10,.@i+1) / pow(10,.@i) + .@num$;			if ( (.@i+1) % 3 == 0 && .@i+1 != .@l ) set .@num$, ","+ .@num$;	}	return .@num$;}OnBuyItem:	ShopSettings( @menu );	for(set @i,0; @i < getarraysize( @bought_nameid ); set @i,@i+1)		for(set @j,0; @j < getarraysize( @ItemLists ); set @j,@j+1)			if( @ItemLists[@j] == @bought_nameid[@i] )			set @TotalCost,@TotalCost + ( @ItemCost[@j] * @bought_quantity[@i] );	mes "^FF0000       BILLING LIST^000000";	mes "^00FF00____________________________^000000";	for( set @i,0; @i < getarraysize( @bought_nameid ); set @i,@i+1 )			mes "^FF0000"+@bought_quantity[@i]+" x ^0000FF"+getitemname( @bought_nameid[@i] )+"^000000";	mes "^00FF00____________________________^000000";	if( getitemname( atoi( @Currency$ ) ) != "null" )		mes "Total Cost : ^0000FF"+ValueConvert( @TotalCost )+" x "+getitemname( atoi( @Currency$ ) )+"^000000";	else if( getitemname( atoi( @Currency$ ) ) == "null" ){		mes "Total Cost : ^0000FF"+ValueConvert( @TotalCost )+" "+@Currency$+"^000000";	}		mes "^00FF00____________________________^000000";	if( ValidateCost( @Currency$,@TotalCost ) ){		if( getitemname( atoi( @Currency$ ) ) != "null" )			mes "[ ^FF0000X^000000 ] Insufficient ^0000FF"+getitemname( atoi( @Currency$ ) )+"^000000";		else{			mes "[ ^FF0000X^000000 ] Insufficient ^0000FF"+@Currency$+"^000000";		}	}else{		if( select( "^0000FFPurchase^000000:Cancel" ) == 1 ){			if( getitemname( atoi( @Currency$ ) ) != "null" )				delitem atoi( @Currency$ ),@TotalCost;			else{				set getd( @Currency$ ),getd( @Currency$ ) - @TotalCost;			}			for(set @i,0; @i < getarraysize( @bought_nameid ); set @i,@i+1)				getitem @bought_nameid[@i],@bought_quantity[@i];			message strcharinfo(0),"Purchased "+getarraysize( @bought_nameid )+" Items.";			mes "Thank you for shopping.";		}	}ClearData();close;}noring:mes "[Training Trader]";mes "I'm so sorry but you need to finish the course and show me the ring from your mastered training,";mes "in order for you to open this shop.";emotion e_sry;close;	}

  6.  

     

    Since im a beginner to this, how can i implement this? for example im using prontera map and the monster is poring. Can you do a sample?

     

    Here's an example:

    // Since this script should only be triggered by touch, we can set the Sprite ID to -1 (invisible)// The extra "5,5," signifies a 5-by-5 cell area around the NPC that will trigger the 'OnTouch' labelprontera,151,172,0    script    no_mob_walk    -1,5,5,{        //end;    // Uncomment this line if you use a visible sprite    OnTouch:    // Triggers when the defined area is walked into        unitwarp 0, "this", -1, -1;    // Warps invoking player/monster to random cell on the same map        end;}
     it warps players too? how can i make it only monsters?

     

     


  7. You can try to warp monsters outside by making use of the OnTouchNPC event label and unitwarp script command:

     

    doc/script_commands.txt (unit* commands, especially unitwarp):

    *unitkill <GID>;*unitwarp <GID>,<Mapname>,<x>,<y>;*unitattack <GID>,<Target ID>;*unitstop <GID>;*unittalk <GID>,<Text>;*unitemote <GID>,<Emote>;Okay, these commands should be fairly self explaining.For the emotions, you can look in db/const.txt for prefixes with e_PS: unitwarp supports a <GID> of zero, which causes the executor of the script to be affected. This can be used with OnTouchNPC to warp monsters:OnTouchNPC:	unitwarp 0,"this",-1,-1;

     

     

    Since im a beginner to this, how can i implement this? for example im using prontera map and the monster is poring. Can you do a sample?

  8. jaBote, on 02 Aug 2013 - 21:07, said:

    Try this one (untested)

     

     

    -	script	night_invader	-1,{OnInit:	if (isday()) donpcevent strcharinfo(3)+"::OnDay";	else donpcevent strcharinfo(3)+"::OnNight";	sleep 10*1000; // Checking every 10 seconds	donpcevent strcharinfo(3)+"::OnInit";	end;OnDay:	if (.mobout) {		announce "The day rises and monsters start to stop invading Prontera.",bc_all;		killmonster "prontera",strnpcinfo(3)+"::OnInvasionMobsDead";		set .mobout, 0;	}	end;OnNight:	if (!.mobout){		// Summon your monsters here, by using the monster script command. Make sure that the event label is strnpcinfo(3)+"::OnInvasionMobsDead".		// Summon example with 30 orc zombies (ID 1153):		monster "prontera",0,0,"--ja--",1153,30,strnpcinfo(3)+"::OnInvasionMobDead";		announce "The night rises and monsters start to attack Prontera!",bc_all;		set .mobout, 1;	}	end;OnInvasionMobDead:	if (isnight()) monster "prontera",0,0,"--ja--",1153,1,strnpcinfo(3)+"::OnInvasionMobDead"; // We simply artificially respawn them.	end;}

    If you want to spawn more than one kind of monster and they all be respawning, your script will be a bit more complicated.

     

    For best perfomance of the NPC you should add OnDay and/or OnNight labels to trigger via the src, but this one is still OK.

     

    im having a problem running it, this one appears

     

    script_rid2sd:fatal error! player not attached!

    Function: strcharinfo (1 parameter):

    data: number value =3

    source: NPC night_invader (invisible/not on a map)


  9. Try this one (untested)

     

     

    -	script	night_invader	-1,{OnInit:	if (isday()) donpcevent strcharinfo(3)+"::OnDay";	else donpcevent strcharinfo(3)+"::OnNight";	sleep 10*1000; // Checking every 10 seconds	donpcevent strcharinfo(3)+"::OnInit";	end;OnDay:	if (.mobout) {		announce "The day rises and monsters start to stop invading Prontera.",bc_all;		killmonster "prontera",strnpcinfo(3)+"::OnInvasionMobsDead";		set .mobout, 0;	}	end;OnNight:	if (!.mobout){		// Summon your monsters here, by using the monster script command. Make sure that the event label is strnpcinfo(3)+"::OnInvasionMobsDead".		// Summon example with 30 orc zombies (ID 1153):		monster "prontera",0,0,"--ja--",1153,30,strnpcinfo(3)+"::OnInvasionMobDead";		announce "The night rises and monsters start to attack Prontera!",bc_all;		set .mobout, 1;	}	end;OnInvasionMobDead:	if (isnight()) monster "prontera",0,0,"--ja--",1153,1,strnpcinfo(3)+"::OnInvasionMobDead"; // We simply artificially respawn them.	end;}
     

    If you want to spawn more than one kind of monster and they all be respawning, your script will be a bit more complicated.

     

    For best perfomance of the NPC you should add OnDay and/or OnNight labels to trigger via the src, but this one is still OK.

     

     

    Thank you!! i will try it ASAP! :)

  10. What does it do:

     

    If you talk to this npc and pay 100z, he will give you 1-10 random points, this points can be added as you continue paying him 100z.

     

    and

     

    Every time i talk to this npc, it will tell me how many points i have, and when i reach 100 and above points it will tell me you reach greater than 100 points, here is your prize(the npc will give apple).

     

    i dont mind if the points will be in just text(alchemy ranking points) or in item form(poring coin).

×
×
  • Create New...

Important Information

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