Jump to content
  • 0

Change effect of item in x map


Question

Posted

Hi!

I need to add, to some items an effect that is only enabled on certain maps, for example an armor gives a bonus of HP in prontera, but when you go to geffen no longer give that bonus.

thanks ~

4 answers to this question

Recommended Posts

  • 0
Posted
4 hours ago, blurryrox said:

maybe you could play around with getmapxy

somehing like this


getmapxy( .@map$,.@x,.@y,0 );
if ( .@map$ == "prontera" ) bonus bHit,30;
end;

not sure if this will work. i didn't test it.

I think this won't work. You can't put an item command to a script. But I believe It's possible. Just not that way tho

  • 0
Posted
10 hours ago, J u d a s said:

I think this won't work. You can't put an item command to a script. But I believe It's possible. Just not that way tho

Yes you can. Exhibit A :

9111,Awakening_Box,Awakening Box,2,0,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ .@ebrand = rand(1,10); if (.@ebrand <= 1) {getitem 9110,2;} if (.@ebrand > 1) {getitem 9110,1;} },{},{}

this work like IG, except that i don't have to set it in itemgroup. Just script.

If it doesn't work you can try set it as a function.

Or maybe it could work like this.

-	script	#mapchecker	-1,{

OnPCStatCalcEvent:
	getmapxy( .@map$,.@x,.@y,0 );
	if ( .@map$ == "prontera" ) return mapcheck = 1;
	else if ( .@map$ == "morocc" ) return mapcheck = 2;
	return mapcheck = 0;
	end;
	
}

//item_db

1101,Sword,Sword,5,100,,500,25,,1,3,0x000654E3,7,2,2,1,2,1,2,{ if(mapcheck == 1){bonus bStr,30;} if(mapcheck == 2){bonust bAgi,30;} },{},{}

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...