Jump to content
  • 0

Change effect of item in x map


Ciruela

Question


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  18
  • Reputation:   0
  • Joined:  04/15/13
  • Last Seen:  

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 ~

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  26
  • Reputation:   4
  • Joined:  06/27/12
  • Last Seen:  

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.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  96
  • Reputation:   23
  • Joined:  06/14/16
  • Last Seen:  

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

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  26
  • Reputation:   4
  • Joined:  06/27/12
  • Last Seen:  

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;} },{},{}

 

Link to comment
Share on other sites

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  



-	script	sample	-1,{

	OnPCStatCalcEvent:
		if ( countitem( <item_id> ) && strcharinfo(3) == "map_name" ) {
			bonus bHit,30;
		}
		end;
		
}

you can try this.

  • Love 1
Link to comment
Share on other sites

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.

×
×
  • Create New...