Jump to content
  • 0

Need A Box Granting Reward Depending On Players Level.


Question

Posted (edited)

Hi,

 

I need some help. I'm running H5

 

How can I create an item that upon activating/opening would grant a specified reward where the amount would depend on player's level?

 

I've tried to do it myself but without luck. Maybe this thing would require to modify the core to add a new function? Below is what I've tried already:

    		<!-- Box of Knowledge - Grade D -->
    	<item id="40110" type="EtcItem" name="Box of Knowledge - Grade D">
    		<set name="icon" val="icon.etc_treasure_box_i01" />		
    		<set name="default_action" val="CAPSULE" />
    		<set name="immediate_effect" val="true" />
    		<set name="material" val="STEEL" />
    		<set name="weight" val="100" />
    		<set name="price" val="2300" />
    		<set name="is_tradable" val="true" />
    		<set name="is_dropable" val="false" />
    		<set name="is_sellable" val="false" />
    		<set name="is_depositable" val="false" />
    		<set name="is_stackable" val="true" />		
    		<set name="handler" val="ItemSkills" />
    		<set name="item_skill" val="40115-1" />	
    	</item>
    	<!-- SKILL to action Box of Knowledge - Grade D -->
    	<skill id="40115" levels="1" name="Box of Knowledge - Grade D">
    		<!-- Confirmed CT2.5 -->
    		<table name="#amount"> 0 800 1500 2000 2500 3000 </table>
    		<table name="#levelRange"> 0;0 20;39 40;51 52;60 61;75 76;85 </table>
    		<set name="create_item_count" val="#amount" />
    		<set name="create_item_id" val="40500" />
    		<set name="isMagic" val="2" /> <!-- Static Skill -->
    		<set name="itemConsumeCount" val="1" />		
    		<set name="operateType" val="A1" />
    		<set name="skillType" val="CREATE_ITEM" />
    		<set name="targetType" val="SELF" />		
    		<cond msgId="129"><player invSize="10" /></cond>
    		<cond msgId="113" addName="1">
    			<player levelRange="#levelRange" />
    		</cond>	
    	</skill>

So I need...

 

Player at lvl 20 opens the box X and gets 100 pieces of item Y

Player at lvl 40 opens the box X and gets 200 pieces of item Y

 

Does anyone know how to do it? Thanks a lot :)

Edited by Sybar

5 answers to this question

Recommended Posts

  • 0
Posted

You should create 2 boxes, one for lvl 20 and second for lvl 40 with the level check. Like the Recovery Scrolls. If you want to do it with one item, you should create a new itemhandler with lvl check and reward.

  • 0
Posted (edited)

You should create 2 boxes, one for lvl 20 and second for lvl 40 with the level check. Like the Recovery Scrolls. If you want to do it with one item, you should create a new itemhandler with lvl check and reward.

Thank you SweeTs. I wanted to believe that it will be as easy as editing some XMLS ;)

 

Anyway, thank you for your suggestion. That will probably be the most time effective solution :)

Edited by Sybar
  • 0
Posted (edited)

I wanted to believe that it will be as easy as editing some XMLS ;)

You can do it only with xml.

 

The only thing you have to do, is to create X item's/boxes for X/Y grade, like Box D/C/B/A/S and those items will use the same skill, only difference would be the skill lvl :)

 

As recovery scrolls, check 8598 ID for example and it's skill.

 

 

Bułka z masłem.

Edited by SweeTs
  • 0
Posted

The only problem is, although your solution is good, I would end up with too many items. It must be a one item granting reward depending on opening player's level. I'll keep looking for a solution.

 

Thanks :)

  • 0
Posted

Then, like I said. Create a new item handler with a switch lvl depended and you will have as much rewards as you want for X and Y level :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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...