se7enet purgatorio

Page 2 of 2 <12
Topic Options
Rate This Topic
#4237 - 07/25/04 05:52 AM Re: Not sure if this is a bug...
Adam
Rice Krispies


Registered: 07/19/04
Posts: 279
Loc: England

Offline
Ah thanks it works! I decided to only have 4 slots since 5 would make it a bit too easy without changing the monsters stats.

I was wondering, would it be basically the same idea as adding a new slot to add a new item, ie: leg armour?

I think i know how to go about it but i would know how to make it so it added to your stats, and effected u in battle.

I also tried making an experience bar, by copying the other bars but i couldnt.

One final thing i tried to do was add a compass of an image, it looked fine, and it kinda worked fine but when u clicked the directions, it just flashed the page and didnt move. So im guessing the following code is wrong:


<form action="index.php?do=move" method="post">
<center>
<input name="north" type="image" src="beta/images/compass_N.gif" width="128" height="40" border="0">
<input name="west" type="image" src="beta/images/compass_W.gif" width="128" height="40" border="0">
<input name="east" type="image" src="beta/images/compass_E.gif" width="128" height="40" border="0">
<input name="south" type="image" src="beta/images/compass_S.gif" width="128" height="40" border="0">
</center></form>

I know it should be in a table and be arranged so its in the correct place and the sizes are wrong, but i just cant get it to function properly.

Any ideas or suggestions on this?

Im sorry i like to modify a few things but this game is amazingly good and customizeable!

thanks

edit: I added slot 4, and all the information i thought was needed to the admin panel, basically i copied every from slot 3, all the error lines of code and such, but replaced it with 4. But it still doesnt let me edit it from my admin panel - any ideas?

1 final thing, i added a monster which had 0hp problems and i fixed that by adding more monsters upto its current level. But, now all the new monsters do 0 damage, and never hit me basically. maybe its due to my unlimited stats... but i dont even get exp or gold for it? so that cant be so.....

Top
#4238 - 07/25/04 05:26 PM Re: Not sure if this is a bug...
Jamin Administrator
Cookie Crisp
****

Registered: 02/25/05
Posts: 2649
Loc: Texas

Offline
Adding a new item type would be a lot more difficult. The drop slots loop through each slot numerically, so adding a new one just means it does one extra loop. The three item types are a lot more hard-coded, though, so it's going to require more work.

For the experience bar, you'd have to also query to get the experience required for your level and one level above yours, and do the math based on those two numbers and your current experience.

The compass image won't work very well. I used to have one in the game myself, but I had to take it out because IE tends to fuck up the image input type, and things were getting all sorts of screwy.

No idea on the admin edit thing... if you copied everything right, it ought to work.

And finally... it probably is because of your unlimited stats. If your numbers are too high, it's probably screwing the math up. And the game also checks for max experience/gold and won't give you anymore if you are already maxed out. Try playing the real way Wink and see if that fixes it.

---Jamin

Top
#4239 - 07/25/04 05:32 PM Re: Not sure if this is a bug...
Adam
Rice Krispies


Registered: 07/19/04
Posts: 279
Loc: England

Offline
Thanks

I made a compass, in javascript in the end and it works fine along with 4 top ten tables.

i sent you a private message aswell..

Top
#4240 - 10/11/04 04:19 PM Re: Not sure if this is a bug...
shadowbq
Grape Nuts


Registered: 09/22/04
Posts: 32
Loc: d.c.

Offline
Thats not that hard, been done.

Assign an extra value to the drop table.
Called something like slot_pos.

Then when someone trys to equip a new drop, check it versus just the slot type you want to equip.

If its empty let'em have it.. if not make'em drop one of the two.

That is.. unless your like me, who thought that dropping things sucked and coded an entire container, sell, weight, max weight, equip, switch, and drop. Then your really on your own.. Smiler

Top
#4241 - 08/29/04 09:07 AM Re: Not sure if this is a bug...
Jimp
Cheerios


Registered: 07/22/04
Posts: 132

Offline
Hi, i added extra slots too without a problem.

I was wondering, if during adding it to the database a extra thing like slot4id and slot4name, could i change this to something like slot_ring_id and slot_ring_name and then when adding them to the fight template and other areas, I would simply add the above in, instead of the slot4name.

The idea of this, is to have a special slot for a ring, or other item. Would this work, and would it add the required stats to the character, and make it so that people can ONLY use this slot for a ring, and nothing else, and visa versa?

i hope this made sense, since im rather tired atm lol

Please write back
cheers Smiler

Top
#4242 - 08/29/04 10:48 AM Re: Not sure if this is a bug...
Jamin Administrator
Cookie Crisp
****

Registered: 02/25/05
Posts: 2649
Loc: Texas

Offline
As far as item drops go, that wouldn't work because it's set up to just loop through a counter and do stuff for field#name and field#id automatically - you just tell it how many times it needs to go through the loop. So you'd have to do extra work to get it to update a field outside the loop that isn't tied to the counter.

You could probably make a ring as a fourth purchaseable item type (aside from weapon/armor/shield), but that would take quite a bit of extra work too. There's a lot of hard-coded logic that goes along with determining what to do with each type of item, I dunno how easy it would be to add a fourth one in there without screwing up everything else too.

Honestly it's probably not worth the effort, imho, unless you're really hell-bent on it.

---Jamin

Top
#4243 - 08/29/04 11:43 AM Re: Not sure if this is a bug...
Jimp
Cheerios


Registered: 07/22/04
Posts: 132

Offline
Would this work:

I add an extra slot (so I'd have 5) and name the last slot Amulet, or Ring, and the amulet and rings would be dropped as drop items, which was what i wanted originally anyway.

Then, instead of naming it Slot within the game by the inventory, I could just call it "Amulet:" or whatever

The only problem i see is that, people can have multiple amulets, or not use the amulet slot for an amulet, but another drop item, or something.

How does that sound? I am kind of hell bent on it if im honest lol.

Top
#4244 - 08/30/04 11:21 AM Re: Not sure if this is a bug...
Jamin Administrator
Cookie Crisp
****

Registered: 02/25/05
Posts: 2649
Loc: Texas

Offline
You can make the game display whatever you want there, via the templates, as long as the fields are still technically called field5name and field5id as far as the actual logic is concerned. But like you said, making it say "Amulet:" or "Ring:" or "Pr0n:" isn't going to really stop them from putting whatever they want in the field - you'd have to bet on everyone being perfectionists like me and feeling that if the field says Ring, I should probably put a ring there.

It's up to you... that would be the easy way out, but it doesn't stop people from doing whatever they want. Or you could bite the bullet and figure out a way to code it so that only one item type can go into the slot... but you're on your own for that.

---Jamin

Top
#4245 - 03/30/05 06:07 AM Re: Not sure if this is a bug...
AnmanIndustries
Cookie Crisp
*****

Registered: 03/21/05
Posts: 2876
Loc: Planet Stupid, AKA Earth

Offline
[quote=Jamin]And about the extra slots thing... it's easy.

In fight.php (the program, not the template), find:


$page .= "<form action="index.php?do=drop" method="post"><select name="slot"><option value="0">Choose One</option><option value="1">Slot 1: ".$userrow["slot1name"]."</option><option value="2">Slot 2: ".$userrow["slot2name"]."</option><option value="3">Slot 3: ".$userrow["slot3name"]."</option></select> <input type="submit" name="submit" value="Submit" /></form>";

Add as many new option tags as you want, just make sure they match the format of the others. Then add the slot#id and slot#name fields to your users table. I think that's all you need to do.

---Jamin[/quote]
[quote=Jamin]Oh yeah... also, you'll need to add the new slots to the showchar.php, onlinechar.php and rightnav.php templates so they show up in profiles.

---Jamin[/quote]
ok okokok.. Ive done this. Now, it could just be a random error, but one of my test users tell me that when they put an item into slot 4, it kicks out the item in slot 2.

eeeeh... Im not so sure whats going on.

Top
#4246 - 03/30/05 02:59 PM Re: Not sure if this is a bug...
turock
Grape Nuts


Registered: 03/19/05
Posts: 38

Offline
Post a copy of the section in your fight.php that you changed so we can see what's up.
Top
Page 2 of 2 <12


Hop to:

se7enet

Barack Obama Logo