|
chris-74269 Magician
Joined: 23 Nov 2004 Posts: 364
|
Posted: Sat Jul 29, 2006 12:31 am
tweaking my database |
this is the trigger code when i see a piece of equipment/weapon/mob/object in a room that adds its name, location, and vnum to a database. it is quite slow though and i was wondering if anyone could suggest some speed tweaks.
Code: |
#pri {
#var armor.name %trim( %replace( %replace( @armor.name, worn), "()"))
#var armor.vnum %roomnum
#var armor.zone %zonenum
#if (@database = 1) {#if (%query( (&Name=@armor.name)&(&Zone=%zonename( @armor.zone)))) {#var armor {}} {#NEW item {name=@armor.name|vnum=@armor.vnum|zone=@armor.zone|type="armor"}}} {}
} |
|
|
|
|
chris-74269 Magician
Joined: 23 Nov 2004 Posts: 364
|
Posted: Wed Oct 18, 2006 6:42 pm |
Code: |
#TRIGGER {^~(a~)%e[1;37m(&armor.name)%e[0m} {
#pri {
#var armor.name %trim( %replace( %replace( @armor.name, worn), "()"))
#var armor.vnum %roomnum
#var armor.zone %zonenum
#if (@database = 1) {
#if (%query( (&Name=@armor.name)&(&Zone=%zonename( @armor.zone)))) {
#var armor {}
#DBRESET
} {#NEW item {name=@armor.name|vnum=@armor.vnum|zone=@armor.zone|type="armor"}}
#DBRESET
} {}
}
} "" {color}
|
currently my database has grown to about 1000 mobs/items/armour/weapons and is slow as can be when running this script. i was wondering if anyone had a way to optimize this or any other speedup tricks? it lags for about 5 seconds each time this trigger fires. |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|