Jump to content
MakeWebGames

Recommended Posts

Posted

Well, i was trying to learn javascript, in the book, it had jQuery, talked about $.get and $.post so i thought could it be usefull for equiping/unequipping quicker. So ive re-coded it and im thinking of re-coding others with parts of jQuery, i pull it from google, uses less stress on sever load. but anyway, 4 re-coded files, no tables, great mod!

inv/inventory.php:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Equip_armor.php:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

equip_weapon.php:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Unequip.php:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Simplez

Posted

Works fine. The only problem I can see is that FF users who love to run noscript run immediately into problems due to the script being called from an external url.

Running a min js file on a server (721kb) isnt that much of a server load. Well as long as your on a decent server :D

For the screenshot lovers out there....here is one for you :D

inv.jpg

Nice job though jquery :D

Posted
Works fine. The only problem I can see is that FF users who love to run noscript run immediately into problems due to the script being called from an external url.

Running a min js file on a server (721kb) isnt that much of a server load. Well as long as your on a decent server :D

For the screenshot lovers out there....here is one for you :D

inv.jpg

Nice job though jquery :D

Thanks for adding screenie

Posted

in laymans terms

 

the jquery will equip/unequip on the page rather than you going back n forth between other pages.

 

I only tested the unequip but im sure the equip will work in the same way.

Posted

Argh,

Why the '@' operator??!? Come on Danny don't you think if there was no globals.php file the game wouldn't work so you wouldn't be able to sign in,

so you wouldn't be available to use the inventory so your script wouldn't work so it wouldn't need the @ there anyway..

Inconclusion: @ = useless ;)

Other than that good job buddy

Meh EDIT: Thanks to Nickson (pointed out that you use it elsewhere also) I didn't notice this so the above applies to the operator on the include ;)

Posted

good point Djkanna.

 

in laymans terms

Always wondered how you spell that but sadly i believe it's layman terms mate

(i did once believe it was 'lamens' from lame + men)

The sheep are among us run for your life!

Posted

one other approach to this is meta refresh or did i miss this totally its 6:00 Am and im running on little sleep lol but here

item_remove($userid, $r['itmid'], 1);

$db->query("UPDATE users SET {$_GET['type']} = {$r['itmid']} WHERE userid={$userid}");

print "Item {$r['itmname']} equipped successfully. <meta http-equiv='Refresh' content='1;url=inventory.php'>";

so after they equip they will see item x equipped successfully then a moment later it kicks you back to the inventory,

and it works with i.e or f.f with no-script on :D

  • 8 months later...
Posted

Thought i would test the modification out.

Unfortunatly this mod dosn't work.

I have uploaded it to a fresh copy of mccodes v2.

Upon clicking equip/unequip it goes to the index page (but does actually perform the action)

I know nothing about ajax/jquery to be honest so cannot help fixing it.

Not mocking you just pointed out my findings. Nice Idea for a little bit of Jquery on the inventory.

Posted
Thought i would test the modification out.

Unfortunatly this mod dosn't work.

I have uploaded it to a fresh copy of mccodes v2.

Upon clicking equip/unequip it goes to the index page (but does actually perform the action)

I know nothing about ajax/jquery to be honest so cannot help fixing it.

Not mocking you just pointed out my findings. Nice Idea for a little bit of Jquery on the inventory.

Works for me

Join the conversation

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

Guest
Reply to this topic...

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