• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[NPC Script] Enchanted Items

justin234

New Member
Joined
Jan 22, 2008
Messages
999
Reaction score
4
Hello, I am looking for something quite complicated.
I am using [7.6] Avesta, that shall inform you more on functions.

When a player talks to an NPC.

Axe/Sword/Club Weapons

Player: Hi.
NPC: Welcome.
Player: enchant stonecutter axe.
NPC: would you like to enchant your stonecutter axe for 20,000gp?
Player: yes.
NPC: Here you are.
------------------------------------------------------------
All Legs

Player: Hi.
NPC: Welcome.
Player: enchant legs.
NPC: would you like to enchant your legs for 5,000gp?
Player: yes.
NPC: Here you are.
------------------------------------------------------------
What does it do?
It takes the weapon, adds 12 attack for 6 hours.
It enchants the legs for 6 hours, with light/speed attributes.

Kind Regards.
 
Last edited:
PHP:
IS_SWORD = {2403, 2404, 2379, 2402, 2384, 2406, 2420, 2385, 2450, 2376, 2395, 2442, 2412, 2411, 2397, 2409, 2419, 7854, 7869, 7744, 7763, 8602, 3963, 2392, 2383, 2413, 7385, 2377, 7408, 7855, 7870, 7745, 7764, 7449, 7858, 7873, 7748, 7766, 7767, 2407, 7856, 7871, 7746, 7765, 2438, 2451, 7401, 7407, 2446, 7406, 7857, 7872, 7747, 2396, 7383, 7416, 7386, 7402, 7384, 7417, 7391, 2393, 7418, 7382, 7390, 7403, 2400, 8930, 7405, 6528, 2408, 2390}

IS_CLUB = {2416, 2382, 2550, 2448, 2401, 2449, 2398, 2422, 2439, 7864, 7879, 7754, 7773, 2417, 2321, 3966, 2394, 2423, 7381, 7425, 7865, 7880, 7755, 7432, 7774, 2434, 7387, 7379, 7430, 7867, 7882, 7757, 7776, 7866, 7868, 7881, 7883, 7756, 7758, 7775, 7777, 2436, 7437, 2445, 2433, 7451, 3961, 7424, 2424, 7452, 7392, 7426, 7410, 7427, 7415, 7421, 2391, 7428, 7422, 7414, 7429, 2437, 7431, 2444, 2452, 2421, 2453, 8928, 8927, 7423, 8929}

IS_AXE = {2405, 2386, 2418, 2388, 8601, 7859, 7874, 7749, 7768, 2428, 2378, 7860, 7875, 7750, 2432, 7769, 2429, 3964, 2435, 2430, 7862, 7877, 7752, 7771, 2425, 3962, 2387, 7861, 7876, 7751, 2381, 7770, 2440, 7863, 7878, 7753, 7772, 2426, 7456, 7419, 7454, 7412, 7380, 7411, 7413, 7388, 7436, 7389, 7433, 2447, 2427, 7420, 2414, 7434, 2454, 2443, 6553, 2431, 7453, 8924, 2415, 8925, 8926}

Something like that to help...XD
 
Bump: This Might Help.

PHP:
IS_SWORD = {2403, 2404, 2379, 2402, 2384, 2406, 2420, 2385, 2450, 2376, 2395, 2442, 2412, 2411, 2397, 2409, 2419, 7854, 7869, 7744, 7763, 8602, 3963, 2392, 2383, 2413, 7385, 2377, 7408, 7855, 7870, 7745, 7764, 7449, 7858, 7873, 7748, 7766, 7767, 2407, 7856, 7871, 7746, 7765, 2438, 2451, 7401, 7407, 2446, 7406, 7857, 7872, 7747, 2396, 7383, 7416, 7386, 7402, 7384, 7417, 7391, 2393, 7418, 7382, 7390, 7403, 2400, 8930, 7405, 6528, 2408, 2390} 

IS_CLUB = {2416, 2382, 2550, 2448, 2401, 2449, 2398, 2422, 2439, 7864, 7879, 7754, 7773, 2417, 2321, 3966, 2394, 2423, 7381, 7425, 7865, 7880, 7755, 7432, 7774, 2434, 7387, 7379, 7430, 7867, 7882, 7757, 7776, 7866, 7868, 7881, 7883, 7756, 7758, 7775, 7777, 2436, 7437, 2445, 2433, 7451, 3961, 7424, 2424, 7452, 7392, 7426, 7410, 7427, 7415, 7421, 2391, 7428, 7422, 7414, 7429, 2437, 7431, 2444, 2452, 2421, 2453, 8928, 8927, 7423, 8929} 

IS_AXE = {2405, 2386, 2418, 2388, 8601, 7859, 7874, 7749, 7768, 2428, 2378, 7860, 7875, 7750, 2432, 7769, 2429, 3964, 2435, 2430, 7862, 7877, 7752, 7771, 2425, 3962, 2387, 7861, 7876, 7751, 2381, 7770, 2440, 7863, 7878, 7753, 7772, 2426, 7456, 7419, 7454, 7412, 7380, 7411, 7413, 7388, 7436, 7389, 7433, 2447, 2427, 7420, 2414, 7434, 2454, 2443, 6553, 2431, 7453, 8924, 2415, 8925, 8926}
 
Since you're ripping this idea off RealOTS I could explain to you how their system is working.

Since RealOTs is based on another server type then OT which allows several items to use the same ID, the answers simple

When you enchant the axe it doesn't change the values of the axe but it sort of takes your axe and gives you a similar looking weapon with other stats which is ticking for the duration of roughly 6 hours then it changes itself to the previous weapon.

Since OTs doesn't support several items using the same ID, I'll give you an alternate solution!

The alternate solution

Since the weapon most players will have is the stonecutter axe or the sword of valor

You could make an NPC that takes your SCA + 20,000gp and gives you an alternate weapon, like the Great axe, it's normally not featured in OTs thus you could name it, give it a duration tick of 6hours and when times out => Normal SCA again.

I apologize but can't be arsed to write an NPC for you at the moment but I'll give you an example of what your "enchanted sca" could look like

<item id="2415" name="Stonecutter Axe">
<attribute key="description" value="This weapon has been blessed by Ecstazya."/>
<attribute key="weight" value="9900"/>
<attribute key="weaponType" value="Axe"/>
<attribute key="defense" value="30"/>
<attribute key="attack" value="62"/>
<attribute key="extradef" value="3"/>
<attribute key="decayTo" value="2431"/>
<attribute key="transformDeEquipTo" value="2431"/>
<attribute key="duration" value="1296000"/>
<attribute key="showduration" value="1"/>
</item>
 
I figured I would have to edit the SPR/DAT/OTB files in the server.
Take the similar sprites and make new weapons.
Then it should work.
 
Hello, I am looking for something quite complicated.
I am using [7.6] Avesta, that shall inform you more on functions.

When a player talks to an NPC.

Axe/Sword/Club Weapons

Player: Hi.
NPC: Welcome.
Player: enchant stonecutter axe.
NPC: would you like to enchant your stonecutter axe for 20,000gp?
Player: yes.
NPC: Here you are.
------------------------------------------------------------
All Legs

Player: Hi.
NPC: Welcome.
Player: enchant legs.
NPC: would you like to enchant your legs for 5,000gp?
Player: yes.
NPC: Here you are.
------------------------------------------------------------
What does it do?
It takes the weapon, adds 12 attack for 6 hours.
It enchants the legs for 6 hours, with light/speed attributes.

Kind Regards.

Bump: This Might Help.

PHP:
IS_SWORD = {2403, 2404, 2379, 2402, 2384, 2406, 2420, 2385, 2450, 2376, 2395, 2442, 2412, 2411, 2397, 2409, 2419, 7854, 7869, 7744, 7763, 8602, 3963, 2392, 2383, 2413, 7385, 2377, 7408, 7855, 7870, 7745, 7764, 7449, 7858, 7873, 7748, 7766, 7767, 2407, 7856, 7871, 7746, 7765, 2438, 2451, 7401, 7407, 2446, 7406, 7857, 7872, 7747, 2396, 7383, 7416, 7386, 7402, 7384, 7417, 7391, 2393, 7418, 7382, 7390, 7403, 2400, 8930, 7405, 6528, 2408, 2390} 

IS_CLUB = {2416, 2382, 2550, 2448, 2401, 2449, 2398, 2422, 2439, 7864, 7879, 7754, 7773, 2417, 2321, 3966, 2394, 2423, 7381, 7425, 7865, 7880, 7755, 7432, 7774, 2434, 7387, 7379, 7430, 7867, 7882, 7757, 7776, 7866, 7868, 7881, 7883, 7756, 7758, 7775, 7777, 2436, 7437, 2445, 2433, 7451, 3961, 7424, 2424, 7452, 7392, 7426, 7410, 7427, 7415, 7421, 2391, 7428, 7422, 7414, 7429, 2437, 7431, 2444, 2452, 2421, 2453, 8928, 8927, 7423, 8929} 

IS_AXE = {2405, 2386, 2418, 2388, 8601, 7859, 7874, 7749, 7768, 2428, 2378, 7860, 7875, 7750, 2432, 7769, 2429, 3964, 2435, 2430, 7862, 7877, 7752, 7771, 2425, 3962, 2387, 7861, 7876, 7751, 2381, 7770, 2440, 7863, 7878, 7753, 7772, 2426, 7456, 7419, 7454, 7412, 7380, 7411, 7413, 7388, 7436, 7389, 7433, 2447, 2427, 7420, 2414, 7434, 2454, 2443, 6553, 2431, 7453, 8924, 2415, 8925, 8926}

The above is what might help with my request.
The top post is my request...


Anyone can help?
 
Last edited:
Back
Top Bottom